public void SetEncapsulatedDocument(
DicomElement element,
bool child,
Stream stream,
DicomEncapsulatedDocument encapsulatedDocument,
DicomCodeSequenceItem conceptNameCodeSequence
)
public:
void SetEncapsulatedDocument(
DicomElement^ element,
bool child,
Stream^ stream,
DicomEncapsulatedDocument^ encapsulatedDocument,
DicomCodeSequenceItem^ conceptNameCodeSequence
)
element
A DicomElement in the data set.
child
true to insert the encapsulated document as a child of the element., false to insert the encapsulated document on the same level as the element.
stream
The stream whose contents will be encapsulated.
encapsulatedDocument
The encapsulated document module attributes
conceptNameCodeSequence
The concept name code sequence attributes
This feature is available in version 16 or higher.
The members of the DicomEncapsulatedDocument class and the DicomCodeSequenceItem class together represent the set of attributes contained in the "Encapsulated Document Module Attributes'. The Encapsulated Information Object Definition (IOD) describes one of the following file types that has been encapsulated within a DICOM information object:
For more information, refer to Part 3 of the DICOM standard.
The encapsulatedDocument class corresponds to the Encapsulated Document Module Attributes described in part 3 of the DICOM specification. To set the Concept Name Code Sequence element (0040,A043) pass a conceptNameCodeSequence object.
stream is a stream whose contents are the document that will be encapsulated. This should be either a PDF or a CDA document, and the member of the DicomEncapsulatedDocument class should be set accordingly.
using Leadtools;
using Leadtools.Dicom;
///
void DicomDataSet_SetEncapsulatedDocumentExample(DicomElement element, bool child, DicomDataSet ds, string sFileDocumentIn)
{
DicomEncapsulatedDocument encapsulatedDocument = new DicomEncapsulatedDocument();
encapsulatedDocument.Type = DicomEncapsulatedDocumentType.Pdf;
encapsulatedDocument.InstanceNumber = 123;
encapsulatedDocument.ContentDate = new DicomDateValue(2008, 12, 31);
encapsulatedDocument.ContentTime = new DicomTimeValue(12, 30, 00, 1);
encapsulatedDocument.AcquisitionDateTime = new DicomDateTimeValue(2008, 12, 31, 12, 30, 00, 01, -3);
encapsulatedDocument.BurnedInAnnotation = "YES";
encapsulatedDocument.DocumentTitle = sFileDocumentIn;
encapsulatedDocument.VerificationFlag = "UNVERIFIED";
encapsulatedDocument.HL7InstanceIdentifier = string.Empty;
// The 'pszMIMETypeOfEncapsulatedDocument' field is ignored when calling SetEncapsulatedDocument
// It is filled in when calling 'SetEncapsulatedDocument'
encapsulatedDocument.MimeTypeOfEncapsulatedDocument = "***** This is ignored when calling SetEncapsulatedDocument *****";
string[] sListOfMimeTypes = new string[] { "image/jpeg", "application/pdf" };
encapsulatedDocument.SetListOfMimeTypes(sListOfMimeTypes);
//encapsulatedDocument.nListOfMIMETypesCount = 2;
DicomCodeSequenceItem conceptNameCodeSequence = new DicomCodeSequenceItem();
conceptNameCodeSequence.CodingSchemeDesignator = "LN";
conceptNameCodeSequence.CodeValue = "12345";
conceptNameCodeSequence.CodeMeaning = "Sample Code Meaning";
ds.SetEncapsulatedDocument(element, child, sFileDocumentIn, encapsulatedDocument, conceptNameCodeSequence);
// You can also use the overload that takes a stream
using (FileStream stream = new FileStream(sFileDocumentIn, FileMode.Open))
{
ds.SetEncapsulatedDocument(element, child, stream, encapsulatedDocument, conceptNameCodeSequence);
}
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document