Class DicomMessage
Base class for DIMSE-C and DIMSE-N message items.
Inherited Members
Namespace: Dicom.Network
Assembly: cs.temp.dll.dll
Syntax
public class DicomMessage
Constructors
DicomMessage()
Initializes a new instance of the DicomMessage class.
Declaration
public DicomMessage()
DicomMessage(DicomDataset)
Initializes a new instance of the DicomMessage class.
Declaration
public DicomMessage(DicomDataset command)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | command | The DICOM dataset representing the message command. |
Properties
ApplicationInfo
Gets or sets the SOP Class Extended Negotiation Service Class Application Information.
Declaration
public DicomServiceApplicationInfo ApplicationInfo { get; set; }
Property Value
Type | Description |
---|---|
DicomServiceApplicationInfo |
Command
Gets or sets the associated DICOM command.
Declaration
public DicomDataset Command { get; protected set; }
Property Value
Type | Description |
---|---|
DicomDataset |
Dataset
Gets or sets the dataset potentially included in the message..
Declaration
public DicomDataset Dataset { get; set; }
Property Value
Type | Description |
---|---|
DicomDataset |
HasDataset
Gets a value indicating whether the message contains a dataset.
Declaration
public bool HasDataset { get; }
Property Value
Type | Description |
---|---|
Boolean |
LastPDUSent
Gets or sets the timestamp of when the last PDU was sent
Declaration
public DateTime? LastPDUSent { get; set; }
Property Value
Type | Description |
---|---|
Nullable<DateTime> |
LastPendingResponseReceived
Gets or sets the timestamp of when the last response with status 'Pending' was received
Declaration
public DateTime? LastPendingResponseReceived { get; set; }
Property Value
Type | Description |
---|---|
Nullable<DateTime> |
PendingSince
Gets or sets the timestamp when the message was taken from the message queue and added to the pending list (i.e. the DICOM request is being sent or already waiting for a response)
Declaration
public DateTime? PendingSince { get; set; }
Property Value
Type | Description |
---|---|
Nullable<DateTime> |
PresentationContext
Gets or sets the presentation Context.
Declaration
public DicomPresentationContext PresentationContext { get; set; }
Property Value
Type | Description |
---|---|
DicomPresentationContext |
SOPClassUID
Gets or sets the affected or requested SOP Class UID
Declaration
public DicomUID SOPClassUID { get; protected set; }
Property Value
Type | Description |
---|---|
DicomUID |
Type
Gets or sets the command field type.
Declaration
public DicomCommandField Type { get; protected set; }
Property Value
Type | Description |
---|---|
DicomCommandField |
UserState
Gets or sets the state object that will be passed from request to response objects.
Declaration
public object UserState { get; set; }
Property Value
Type | Description |
---|---|
Object |
Methods
IsRequest(DicomCommandField)
Evaluates whether a DICOM message is a request or a response.
Declaration
public static bool IsRequest(DicomCommandField type)
Parameters
Type | Name | Description |
---|---|---|
DicomCommandField | type | DICOM command field type. |
Returns
Type | Description |
---|---|
Boolean | True if message is a request, false otherwise. |
IsTimedOut(TimeSpan)
Given a timeout duration, returns whether this DICOM message is considered timed out or not.
Declaration
public bool IsTimedOut(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | The timeout duration that should be taken into account |
Returns
Type | Description |
---|---|
Boolean | Whether this DICOM message is considered timed out or not. |
ToString()
Formatted output of the DICOM message.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | Formatted output string of the DICOM message. |
Overrides
ToString(DicomCommandField)
Formatted output of the DICOM message.
Declaration
public static string ToString(DicomCommandField type)
Parameters
Type | Name | Description |
---|---|---|
DicomCommandField | type | DICOM command field type. |
Returns
Type | Description |
---|---|
String | Formatted output string of the DICOM message. |
ToString(Boolean)
Formatted output of the DICOM message.
Declaration
public string ToString(bool printDatasets)
Parameters
Type | Name | Description |
---|---|---|
Boolean | printDatasets | Indicates whether datasets should be printed. |
Returns
Type | Description |
---|---|
String | Formatted output string of the DICOM message. |