Class DicomPresentationContext
Representation of a presentation context.
Inherited Members
Namespace: Dicom.Network
Assembly: cs.temp.dll.dll
Syntax
public class DicomPresentationContext
Constructors
DicomPresentationContext(Byte, DicomUID)
Initializes a new instance of the DicomPresentationContext class.
Declaration
public DicomPresentationContext(byte pcid, DicomUID abstractSyntax)
Parameters
Type | Name | Description |
---|---|---|
Byte | pcid | The presentation context ID. |
DicomUID | abstractSyntax | The abstract syntax associated with the presentation context. |
DicomPresentationContext(Byte, DicomUID, Nullable<Boolean>, Nullable<Boolean>)
Initializes a new instance of the DicomPresentationContext class.
Declaration
public DicomPresentationContext(byte pcid, DicomUID abstractSyntax, bool? userRole, bool? providerRole)
Parameters
Type | Name | Description |
---|---|---|
Byte | pcid | The presentation context ID. |
DicomUID | abstractSyntax | The abstract syntax associated with the presentation context. |
Nullable<Boolean> | userRole | Indicates whether SCU role is supported. |
Nullable<Boolean> | providerRole | Indicates whether SCP role is supported. |
Properties
AbstractSyntax
Gets the abstact syntax associated with the presentation context.
Declaration
public DicomUID AbstractSyntax { get; }
Property Value
Type | Description |
---|---|
DicomUID |
AcceptedTransferSyntax
Gets the accepted transfer syntax, if defined, otherwise
null
.
Declaration
public DicomTransferSyntax AcceptedTransferSyntax { get; }
Property Value
Type | Description |
---|---|
DicomTransferSyntax |
ID
Gets the presentation context ID.
Declaration
public byte ID { get; }
Property Value
Type | Description |
---|---|
Byte |
ProviderRole
Gets an indicator whether presentation context supports an SCU role. If undefined, default value is assumed.
Declaration
public bool? ProviderRole { get; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
Result
Gets the association negotiation result.
Declaration
public DicomPresentationContextResult Result { get; }
Property Value
Type | Description |
---|---|
DicomPresentationContextResult |
UserRole
Gets an indicator whether presentation context supports an SCU role. If undefined, default value is assumed.
Declaration
public bool? UserRole { get; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
Methods
AcceptTransferSyntaxes(DicomTransferSyntax[])
Compares a list of transfer syntaxes accepted by the SCP against the list of transfer syntaxes proposed by the SCU. Sets the presentation
context Result
to DicomPresentationContextResult.Accept
if an accepted transfer syntax is found. If no accepted transfer
syntax is found, the presentation context Result
is set to DicomPresentationContextResult.RejectTransferSyntaxesNotSupported
.
Declaration
public bool AcceptTransferSyntaxes(params DicomTransferSyntax[] acceptedTransferSyntaxes)
Parameters
Type | Name | Description |
---|---|---|
DicomTransferSyntax[] | acceptedTransferSyntaxes | Transfer syntaxes that the SCP accepts for the proposed abstract syntax. |
Returns
Type | Description |
---|---|
Boolean | Returns |
AcceptTransferSyntaxes(DicomTransferSyntax[], Boolean)
Compares a list of transfer syntaxes accepted by the SCP against the list of transfer syntaxes proposed by the SCU. Sets the presentation
context Result
to DicomPresentationContextResult.Accept
if an accepted transfer syntax is found. If no accepted transfer
syntax is found, the presentation context Result
is set to DicomPresentationContextResult.RejectTransferSyntaxesNotSupported
.
Declaration
public bool AcceptTransferSyntaxes(DicomTransferSyntax[] acceptedTransferSyntaxes, bool scpPriority)
Parameters
Type | Name | Description |
---|---|---|
DicomTransferSyntax[] | acceptedTransferSyntaxes | Transfer syntaxes that the SCP accepts for the proposed abstract syntax. |
Boolean | scpPriority | If set to |
Returns
Type | Description |
---|---|
Boolean | Returns |
AddTransferSyntax(DicomTransferSyntax)
Add transfer syntax.
Declaration
public void AddTransferSyntax(DicomTransferSyntax ts)
Parameters
Type | Name | Description |
---|---|---|
DicomTransferSyntax | ts | Transfer syntax to add to presentation context. |
ClearTransferSyntaxes()
Clear all supported transfer syntaxes.
Declaration
public void ClearTransferSyntaxes()
GetResultDescription()
Get user-friendly description of negotiation result.
Declaration
public string GetResultDescription()
Returns
Type | Description |
---|---|
String | User-friendly description of negotiation result. |
GetScpRolePresentationContext(DicomUID, DicomTransferSyntax[])
Get presentation context valid for C-GET requests for the specified abstractSyntax
.
Declaration
public static DicomPresentationContext GetScpRolePresentationContext(DicomUID abstractSyntax, params DicomTransferSyntax[] transferSyntaxes)
Parameters
Type | Name | Description |
---|---|---|
DicomUID | abstractSyntax | Abstract syntax for which presentation context should be generated. |
DicomTransferSyntax[] | transferSyntaxes | Supported transfer syntaxes. If or empty, ImplicitVRLittleEndian is
added as default transfer syntax.
|
Returns
Type | Description |
---|---|
DicomPresentationContext | Presentation context valid for C-GET requests for the specified |
GetScpRolePresentationContextsFromStorageUids(DicomStorageCategory, DicomTransferSyntax[])
Get storage category collection of presentation contexts valid for C-GET requests.
Declaration
public static IEnumerable<DicomPresentationContext> GetScpRolePresentationContextsFromStorageUids(DicomStorageCategory storageCategory, params DicomTransferSyntax[] transferSyntaxes)
Parameters
Type | Name | Description |
---|---|---|
DicomStorageCategory | storageCategory | Storage category for which the sub-set of presentation context should be selected. |
DicomTransferSyntax[] | transferSyntaxes | Supported transfer syntaxes. |
Returns
Type | Description |
---|---|
IEnumerable<DicomPresentationContext> | Collection of presentation contexts valid for C-GET requests. |
GetScpRolePresentationContextsFromStorageUids(String, DicomTransferSyntax[])
Get, potentially filtered, collection of presentation contexts valid for C-GET requests.
Declaration
public static IEnumerable<DicomPresentationContext> GetScpRolePresentationContextsFromStorageUids(string filter, params DicomTransferSyntax[] transferSyntaxes)
Parameters
Type | Name | Description |
---|---|---|
String | filter | Filter to apply when selecting a sub-set of active storage UID:s, or null to select all. |
DicomTransferSyntax[] | transferSyntaxes | Supported transfer syntaxes. |
Returns
Type | Description |
---|---|
IEnumerable<DicomPresentationContext> | Collection of presentation contexts valid for C-GET requests. |
GetTransferSyntaxes()
Get read-only list of supported transfer syntaxes.
Declaration
public IList<DicomTransferSyntax> GetTransferSyntaxes()
Returns
Type | Description |
---|---|
IList<DicomTransferSyntax> |
HasTransferSyntax(DicomTransferSyntax)
Checks whether presentation context contains ts
.
Declaration
public bool HasTransferSyntax(DicomTransferSyntax ts)
Parameters
Type | Name | Description |
---|---|---|
DicomTransferSyntax | ts | Transfer syntax to check. |
Returns
Type | Description |
---|---|
Boolean | if ts is supported, otherwise.
|
RemoveTransferSyntax(DicomTransferSyntax)
Remove transfer syntax.
Declaration
public void RemoveTransferSyntax(DicomTransferSyntax ts)
Parameters
Type | Name | Description |
---|---|---|
DicomTransferSyntax | ts | Transfer syntax to remove from presentation context. |
SetResult(DicomPresentationContextResult)
Sets the Result
of this presentation context.
The preferred method of accepting presentation contexts is to call one of the AcceptTransferSyntaxes
methods.
Declaration
public void SetResult(DicomPresentationContextResult result)
Parameters
Type | Name | Description |
---|---|---|
DicomPresentationContextResult | result | Result status to return for this proposed presentation context. |
SetResult(DicomPresentationContextResult, DicomTransferSyntax)
Sets the Result
and AcceptedTransferSyntax
of this presentation context.
The preferred method of accepting presentation contexts is to call one of the AcceptTransferSyntaxes
methods.
Declaration
public void SetResult(DicomPresentationContextResult result, DicomTransferSyntax acceptedTransferSyntax)
Parameters
Type | Name | Description |
---|---|---|
DicomPresentationContextResult | result | Result status to return for this proposed presentation context. |
DicomTransferSyntax | acceptedTransferSyntax | Accepted transfer syntax for this proposed presentation context. |