←Select platform

IRoleSelectionProvider Interface

Summary

Allows implementors to support DICOM role selection features in an add-in.

Syntax
C#
VB
C++
public interface IRoleSelectionProvider : IExtendedPresentationContextProvider, IPresentationContextProvider 
Public Interface IRoleSelectionProvider 
   Inherits IExtendedPresentationContextProvider, IPresentationContextProvider 
public: 
   interface class IRoleSelectionProvider abstract : IExtendedPresentationContextProvider, IPresentationContextProvider 
Remarks

Role selection occurs during DICOM Association negotiation between an SCU and an SCP. Role selection is of particular interest in the following DICOM classes:

  • Storage Commitment classes
  • Procedure Step SOP Classes
  • Media Creation Management Service Class
  • Classes of the Substance Administration Query Service Class
  • SOP Classes of the Composite Instance Root Retrieve Service
    • C-MOVE
    • C-GET
  • C-FIND Basic Worklist Management Service Class

In the PACS Framework, Role Selection can be specified in two ways:

  • Globally for all classes:
  • Individually for each class
    • Role selection options for indvidual classes are specified through a PACS Framework add-in that implements the IRoleSelectionProvider interface. In this case, the role selection can be specified per abstract syntax. The Leadtools.Medical.Storage.AddIns.dll add-in implements this interface, and is included in the toolkit as both a binary and a demo with source code.

For more information, see RoleSelectionFlags.

For example usage, see the Leadtools.Medical.Storage.AddIns.dll sample.

Example

This example shows a basic PACS Framework add-in that implements the IRoleSelectionProvider interface.

C#
VB
using Leadtools.Dicom.AddIn.Attributes; 
using Leadtools.Dicom.AddIn.Interfaces; 
using Leadtools.Dicom; 
using Leadtools.Dicom.AddIn; 
 
 
public class RoleSelectionProviderAddin : IRoleSelectionProvider 
{ 
 
   private List<string> _acceptUserProviderProposedList = new List<string>(); 
 
   public RoleSelectionProviderAddin() 
   { 
      // Storage Commitment classes 
      _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPullModelClass); 
      _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPullModelInstance); 
      _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPushModelClass); 
      _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPushModelInstance); 
 
      // Procedure Step SOP Classes 
      _acceptUserProviderProposedList.Add(DicomUidType.GeneralPurposePerformedProcedureStepSopClass); 
      _acceptUserProviderProposedList.Add(DicomUidType.GeneralPurposeScheduledProcedureStepSopClass); 
 
      // Media Creation Management Service Class 
      _acceptUserProviderProposedList.Add(DicomUidType.MediaCreationManagement); 
 
      // C-MOVE 
      _acceptUserProviderProposedList.Add(DicomUidType.PatientRootQueryMove); 
      _acceptUserProviderProposedList.Add(DicomUidType.PatientStudyQueryMove); 
      _acceptUserProviderProposedList.Add(DicomUidType.StudyRootQueryMove); 
 
      // C-GET 
      _acceptUserProviderProposedList.Add(DicomUidType.PatientRootQueryGet); 
      _acceptUserProviderProposedList.Add(DicomUidType.PatientStudyQueryGet); 
      _acceptUserProviderProposedList.Add(DicomUidType.StudyRootQueryGet); 
 
   } 
 
   public DicomClient Client 
   { 
      private get; 
      set; 
   } 
 
   public ExtendedNegotiation GetExtended(string abstractSyntax) 
   { 
      return ExtendedNegotiation.None; 
   } 
 
   public RoleSelectionFlags GetRoleSelection(string abstractSyntax) 
   { 
      RoleSelectionFlags roleSelectionFlags = RoleSelectionFlags.Disabled; 
 
      if (_acceptUserProviderProposedList.Contains(abstractSyntax)) 
      { 
         roleSelectionFlags = RoleSelectionFlags.AcceptAllProposed; 
      } 
 
      return roleSelectionFlags; 
   } 
 
   public bool IsAbstractSyntaxSupported(string abstractSyntax) 
   { 
      bool supported = _acceptUserProviderProposedList.Contains(abstractSyntax) || (abstractSyntax == DicomUidType.VerificationClass); 
      return supported;  
} 
 
   public bool IsTransferSyntaxSupported(string abstractSyntax, string transferSyntax) 
   { 
      bool supported = ( 
            transferSyntax == DicomUidType.ExplicitVRLittleEndian || 
            transferSyntax == DicomUidType.ExplicitVRBigEndian || 
            transferSyntax == DicomUidType.ImplicitVRLittleEndian 
            ); 
      return supported; 
   } 
} 
Imports Leadtools.Dicom.AddIn.Attributes 
Imports Leadtools.Dicom.AddIn.Interfaces 
Imports Leadtools.Dicom 
Imports Leadtools.Dicom.AddIn 
 
Public Class RoleSelectionProviderAddin 
    Implements IRoleSelectionProvider 
 
    Private _acceptUserProviderProposedList As New List(Of String)() 
 
    Public Sub New() 
        ' Storage Commitment classes 
        _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPullModelClass) 
        _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPullModelInstance) 
        _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPushModelClass) 
        _acceptUserProviderProposedList.Add(DicomUidType.StorageCommitmentPushModelInstance) 
 
        ' Procedure Step SOP Classes 
        _acceptUserProviderProposedList.Add(DicomUidType.GeneralPurposePerformedProcedureStepSopClass) 
        _acceptUserProviderProposedList.Add(DicomUidType.GeneralPurposeScheduledProcedureStepSopClass) 
 
        ' Media Creation Management Service Class 
        _acceptUserProviderProposedList.Add(DicomUidType.MediaCreationManagement) 
 
        ' C-MOVE 
        _acceptUserProviderProposedList.Add(DicomUidType.PatientRootQueryMove) 
        _acceptUserProviderProposedList.Add(DicomUidType.PatientStudyQueryMove) 
        _acceptUserProviderProposedList.Add(DicomUidType.StudyRootQueryMove) 
 
        ' C-GET 
        _acceptUserProviderProposedList.Add(DicomUidType.PatientRootQueryGet) 
        _acceptUserProviderProposedList.Add(DicomUidType.PatientStudyQueryGet) 
        _acceptUserProviderProposedList.Add(DicomUidType.StudyRootQueryGet) 
 
    End Sub 
 
    Private privateClient As DicomClient 
    Public Property Client() As DicomClient Implements IExtendedPresentationContextProvider.Client 
        Private Get 
            Return privateClient 
        End Get 
        Set(ByVal value As DicomClient) 
            privateClient = value 
        End Set 
    End Property 
 
    Public Function GetExtended(ByVal abstractSyntax As String) As ExtendedNegotiation Implements IExtendedPresentationContextProvider.GetExtended 
        Return ExtendedNegotiation.None 
    End Function 
 
    Public Function GetRoleSelection(ByVal abstractSyntax As String) As RoleSelectionFlags Implements IRoleSelectionProvider.GetRoleSelection 
        Dim roleSelectionFlags As RoleSelectionFlags = RoleSelectionFlags.Disabled 
 
        If _acceptUserProviderProposedList.Contains(abstractSyntax) Then 
            roleSelectionFlags = RoleSelectionFlags.AcceptAllProposed 
        End If 
 
        Return roleSelectionFlags 
    End Function 
 
    Public Function IsAbstractSyntaxSupported(ByVal abstractSyntax As String) As Boolean 
        Dim supported As Boolean = _acceptUserProviderProposedList.Contains(abstractSyntax) OrElse (abstractSyntax = DicomUidType.VerificationClass) 
        Return supported 
    End Function 
 
    Public Function IsTransferSyntaxSupported(ByVal abstractSyntax As String, ByVal transferSyntax As String) As Boolean Implements IPresentationContextProvider.IsTransferSyntaxSupported 
        Dim supported As Boolean = (transferSyntax = DicomUidType.ExplicitVRLittleEndian OrElse transferSyntax = DicomUidType.ExplicitVRBigEndian OrElse transferSyntax = DicomUidType.ImplicitVRLittleEndian) 
        Return supported 
    End Function 
 
    Private Function IPresentationContextProvider_IsAbstractSyntaxSupported(abstractSyntax As String) As Boolean Implements IPresentationContextProvider.IsAbstractSyntaxSupported 
        Throw New NotImplementedException() 
    End Function 
End Class 
Requirements
Target Platforms
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom.AddIn Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.