LEADTOOLS DICOM C DLL Help > Function References > l_dicomsetencapsulateddocumentmemory |
#include "l_bitmap.h"
L_LTDIC_API L_UINT16 EXT_FUNCTION L_DicomSetEncapsulatedDocumentMemory(hDS, pElement, bChild, pBuffer, uBufferSize, pEncapsulatedDocument, pConceptNameCodeSequence)
HDICOMDS hDS; |
/* a DICOM handle */ |
pDICOMELEMENT pElement; |
/* pointer to a DICOMELEMENT structure */ |
L_BOOL bChild; |
/* flag that indicates where to insert the encapsulated document elements */ |
L_UCHAR *pBuffer; |
/* pointer to a memory buffer that contains the source encapsulated document to be inserted into the dataset */ |
L_UINT32 uBufferSize; |
/* size of the memory buffer (in bytes) */ |
pDICOMENCAPSULATEDDOCUMENT pEncapsulatedDocument; |
/* pointer to structure */ |
pDICOMCODESEQUENCEITEM pConceptNameCodeSequence; |
/* pointer to structure */ |
Inserts an encapsulated document and corresponding DICOM elements into a DICOM data set. This feature is available in version 17.5 or higher.
Parameter |
Description |
|
hDS |
A DICOM handle. |
|
pElement |
Pointer to a DICOMELEMENT structure that contains an item in the Data Set. The inserted item will be inserted as a neighbor to this item, or as a child, depending on the value of bChild. |
|
bChild |
Flag that indicates where to insert the item. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
The new item will be inserted as the last child of pElement. |
|
FALSE |
The new item will be inserted as the last sibling of pElement. |
pBuffer |
Address of the memory buffer that contains the source encapsulated document (PDF or CDA) which will be inserted into the DICOM dataset. |
|
uBufferSize |
Size of the memory buffer (in bytes). |
|
pEncapsulatedDocument |
Pointer to a DICOMENCAPSULATEDDOCUMENT structure, which is filled with the encapsulated document module attributes. This member must NOT be NULL. |
|
pConceptNameCodeSequence |
Pointer to a DICOMCODESEQUENCEITEM structure, which is filled with the Concept Name Code Sequence attributes. This member can be NULL. |
Returns
DICOM_SUCCESS |
The function was successful. |
> 0 |
An error occurred. Refer to Return Codes. |
Comments
The members of the DICOMENCAPSULATEDDOCUMENT structure and the DICOMCODESEQUENCEITEM structure together represent the set of attributes contained in the "Encapsulated Document Module Attributes". The Encapsulated Information Object Definition (IOD) describes either a
PDF document
CDA document
that has been encapsulated within a DICOM information object.
For more information, refer to Part 3 of the DICOM standard.
The DICOMENCAPSULATEDDOCUMENT structure corresponds to the Encapsulated Document Module Attributes described in part 3 of the DICOM specification. To include the Concept Name Code Sequence element (0040,A043) pass a pointer to a pConceptNameCodeSequence item.
The pszFileDocument argument points to a file that contains the document that you want to encapsulate. This should be either a PDF or a CDA document, and the uType member of the DICOMENCAPSULATEDDOCUMENT structure should be set accordingly.
Before calling this function:
Initialize pEncapsulatedDocument ->uStructSize to be sizeof(DICOMENCAPSULATEDDOCUMENT) and initialize the structure members. Any of the members of the structure that are pointers can be NULL. NULL members will be ignored and the corresponding elements will not be inserted into the DICOM data set
If pConceptNameCodeSequence is not NULL, initialize pConceptNameCodeSequence ->uStructSize to be sizeof(DICOMCODESEQUENCEITEM) and initialize all structure members. Any of the members of the structure that are pointers can be NULL. NULL members will be ignored and the corresponding elements will not be inserted into the DICOM data set
The L_DicomSetEncapsulatedDocumentMemory function takes a pointer to a buffer (and a length) as the source for the encapsulated document.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64, Linux.
See Also
Functions: |
L_DicomSetEncapsulatedDocument, L_DicomGetEncapsulatedDocument, L_DicomGetEncapsulatedDocumentMemory |
Topics: |
|
|
Example
For an example, refer to L_DicomGetEncapsulatedDocumentMemory.