Sets the extended data associated with the specified Presentation Context.
#include "ltdic.h"
L_LTDIC_API L_INT L_DicomSetExtended(hPDU, nID, pData, nLength)
A DICOM Associate handle.
Presentation ID of the Presentation Context to which to set the extended data. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.
Buffer that contains the data to set.
Length of pData.
Value | Meaning |
---|---|
DICOM_SUCCESS | The function was successful. |
>0 | An error occurred. Refer to Return Codes. |
To retrieve the length of the extended data associated with a Presentation Context, call L_DicomGetLengthExtended.
To get extended data associated with a Presentation Context, call L_DicomGetExtended.
Win32, x64, Linux.
L_INT DicomSetExtendedExample(HDICOMPDU hPDU, L_UCHAR nID, HWND hWnd)
{
L_TCHAR szOut[2000];
L_TCHAR szTemp[200];
L_UCHAR Data[]={0,1,1,0,1};
L_UCHAR *pData=NULL;
L_UINT32 lBytes, x;
L_INT nRet;
/* set 5 bytes of extended data for a particular Presentation */
nRet = L_DicomSetExtended(hPDU, nID, (L_UCHAR *)Data, 5);
if (nRet != DICOM_SUCCESS)
return nRet;
/* get the data and display it */
lBytes = L_DicomGetLengthExtended(hPDU, nID);
pData = L_DicomGetExtended(hPDU, nID);
lstrcpy(szOut, TEXT("Extended Data\n"));
for(x=0; x<lBytes; x++)
{
wsprintf(szTemp, TEXT("Byte #1: %d\n"), pData[x]);
lstrcat(szOut, szTemp);
}
MessageBox(hWnd, szOut, TEXT("Test"), MB_OK);
return DICOM_SUCCESS;
}
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