#include "ltdic.h"
L_LTDIC_API L_BOOL L_DicomIsRoleSelect(hPDU, nID)
Determines whether Role Selection is enabled for the specified Presentation Context of the specified DICOM Associate.
A DICOM Associate handle.
Presentation ID of the Presentation Context for which you wish to check Role Selection. 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.
Value | Meaning |
---|---|
TRUE | Role Selection is enabled for the specified Presentation Context of the specified DICOM Associate. |
FALSE | Role Selection is disabled for the specified Presentation Context of the specified DICOM Associate. |
If Role Selection is enabled, the role of the specified Presentation Context can be retrieved using L_DicomGetUserRole and L_DicomGetProviderRole. To set the role of the specified Presentation Context, use L_DicomSetRoleSelect.
Required DLLs and Libraries
Win32, x64, Linux.
L_INT DicomIsRoleSelectExample(HDICOMPDU hPDU)
{
L_INT x;
L_UCHAR nID;
L_TCHAR szOut[20000];
L_TCHAR szTemp[2000];
L_UCHAR nUser;
L_UCHAR nProvider;
L_INT nRet;
/* indicate that we wish to serve as user for each SOP associated */
for(x = 0; x < L_DicomGetPresentationCount(hPDU); x ++)
{
nID = L_DicomGetPresentation(hPDU, x);
nRet = L_DicomSetRoleSelect(hPDU, nID, TRUE, PDU_ROLE_SUPPORT, PDU_ROLE_NON_SUPPORT);
if (nRet != DICOM_SUCCESS)
return nRet;
}
/* now, display the information */
lstrcpy(szOut, TEXT("Role Select Info\n"));
for(x = 0; x < L_DicomGetPresentationCount(hPDU); x ++)
{
nID = L_DicomGetPresentation(hPDU, x);
wsprintf(szTemp, TEXT("ID: %d"), nID);
lstrcat(szOut, szTemp);
if(L_DicomIsRoleSelect(hPDU, nID))
{
nUser = L_DicomGetUserRole(hPDU, nID);
nProvider = L_DicomGetProviderRole(hPDU, nID);
wsprintf(szTemp, TEXT(" User: %d"), nUser);
lstrcat(szOut, szTemp);
wsprintf(szTemp, TEXT(" Provider: %d\n"), nProvider);
lstrcat(szOut, szTemp);
}
else
lstrcat(szOut, TEXT(" No Role Select\n"));
}
MessageBox(NULL, 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