Available in LEADTOOLS Medical Imaging toolkits. |
#include "ltdic.h"
L_LTDIC_API L_INT L_DicomSetRoleSelect(hPDU, nID, bEnabled, nUser, nProvider)
HDICOMPDU hPDU; |
/* a DICOM Associate handle */ |
L_UCHAR nID; |
/* presentation ID */ |
L_BOOL bEnabled; |
/* flag that indicates whether to enable role selection */ |
L_UCHAR nUser; |
/* flag that indicates whether to support the user role */ |
L_UCHAR nProvider; |
/* flag that indicates whether to support the provider role */ |
Enables or disables Role Selection. It also sets the User Role and Provider Role, if enabled, for the specified Presentation Context of the specified DICOM Associate.
Parameter |
Description |
|
hPDU |
A DICOM Associate handle. |
|
nID |
Presentation ID of the Presentation Context in which to set the User Role and Provider Role. 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. |
|
bEnabled |
Flag that indicates whether to enable or disable Role Selection. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
Enable Role Selection. |
|
FALSE |
Disable Role Selection. |
nUser |
Flag that indicates whether to support the User Role for the specified Presentation Context. Possible values are: |
|
|
Value |
Meaning |
|
PDU_ROLE_NON_SUPPORT |
[0] Do not support the User Role. |
|
PDU_ROLE_SUPPORT |
[1] Support the User Role. |
nProvider |
Flag that indicates whether to support the Provider Role for the specified Presentation Context. Possible values are: |
|
|
Value |
Meaning |
|
PDU_ROLE_NON_SUPPORT |
[0] Do not support the Provider Role. |
|
PDU_ROLE_SUPPORT |
[1] Support the Provider Role. |
Returns
DICOM_SUCCESS |
The function was successful. |
>0 |
An error occurred. Refer to Return Codes. |
Comments
If Role Selection is enabled for a specific Presentation Context, that Application Entity can act as an SCU, an SCP or both for that Presentation Context.
For example, suppose a DICOM Associate Request has three Presentation Contexts. One Presentation Context is for the transfer of X-RAY data, another Presentation Context is for the transfer of CT data, and the third Presentation Context is for the transfer of Nuclear Medicine data.
To serve as an SCU only for the X-RAY data transfer, the User Role for the first Presentation Context should be PDU_ROLE_SUPPORT, while the Provider Role should be PDU_ROLE_NON_SUPPORT.
To serve as both an SCU and an SCP for the CT data transfer, the User Role and the Provider Role should both be PDU_ROLE_SUPPORT for the second Presentation Context.
To serve as an SCU only for the Nuclear Medicine data transfer, the User Role for the third Presentation Context should be PDU_ROLE_SUPPORT, while the Provider Role should be PDU_ROLE_NON_SUPPORT.
If Role Selection is enabled, the User Role and Provider Role settings can be retrieved using L_DicomGetUserRole and L_DicomGetProviderRole.
To determine whether Role Selection is enabled, use L_DicomIsRoleSelect.
Required DLLs and Libraries
LTDIC 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
See Also
Functions: |
L_DicomIsRoleSelect, L_DicomGetUserRole, L_DicomGetProviderRole |
Topics: |
Example
For an example, refer to L_DicomIsRoleSelect.