Class DicomServiceApplicationInfo
Base class that encapsulates the Service Class Application Information field for the SOP Class Extended Negotiation Sub-item. Inherited classes can implement the application information specific to the Service Class specification identified by the SOP Class UID. See: http://dicom.nema.org/medical/dicom/current/output/chtml/part07/sect_D.3.3.5.html for details on the Service Class Application Information field.
Inheritance
Implements
Inherited Members
Namespace: FellowOakDicom.Network
Assembly: fo-dicom.core.dll
Syntax
public class DicomServiceApplicationInfo : IEnumerable<KeyValuePair<byte, byte>>, IEnumerable
Constructors
DicomServiceApplicationInfo()
Initializes an instance of the DicomServiceApplicationInfo class.
Declaration
public DicomServiceApplicationInfo()
DicomServiceApplicationInfo(Byte[])
Initializes an instance of the DicomServiceApplicationInfo class.
Declaration
public DicomServiceApplicationInfo(byte[] rawApplicationInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | rawApplicationInfo | Raw byte array with the application info |
Properties
Count
Gets the number of fields contained in the DicomServiceApplicationInfo.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Byte]
Gets the byte value for given index
.
Declaration
public byte this[byte index] { get; protected set; }
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
Property Value
Type | Description |
---|---|
System.Byte | Byte value |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Invalid field index. |
OnCreateApplicationInfo
A delegate to be executed when the application info is created.
Declaration
public static DicomServiceApplicationInfo.CreateApplicationInfoDelegate OnCreateApplicationInfo { get; set; }
Property Value
Type | Description |
---|---|
DicomServiceApplicationInfo.CreateApplicationInfoDelegate |
Methods
Add(Byte, Byte)
Add a single application info field value given by index and value.
Declaration
public void Add(byte index, byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
System.Byte | value | Application info field value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Invalid field index or a field with same index already exists. |
AddOrUpdate(Byte, Boolean)
Add or update a single application info field value given by index and value.
Declaration
public void AddOrUpdate(byte index, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
System.Boolean | value | Application info field value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Invalid field index. |
AddOrUpdate(Byte, Byte)
Add or update a single application info field value given by index and value.
Declaration
public void AddOrUpdate(byte index, byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
System.Byte | value | Application info field value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Invalid field index. |
Contains(Byte)
Determines whether the Service Class Application Info contains a field with the specified index.
Declaration
public bool Contains(byte index)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Create(DicomUID, Byte[])
A factory method to initialize a new application information class based on the provided sop class.
Declaration
public static DicomServiceApplicationInfo Create(DicomUID sopClass, byte[] rawApplicationInfo)
Parameters
Type | Name | Description |
---|---|---|
DicomUID | sopClass | SOP Class UID. |
System.Byte[] | rawApplicationInfo | The raw application info byte data. |
Returns
Type | Description |
---|---|
DicomServiceApplicationInfo | The application information class. |
GetEnumerator()
Returns an enumerator that iterates through the Application Info fields.
Declaration
public IEnumerator<KeyValuePair<byte, byte>> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Byte, System.Byte>> | Enumerator for the Application Info fields. |
GetValue(Byte)
Get the application info field value.
Declaration
public byte GetValue(byte index)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
Returns
Type | Description |
---|---|
System.Byte | Application info field value. |
GetValueAsBoolean(Byte, Boolean)
Get the application info field value as
bool
.
Declaration
public bool GetValueAsBoolean(byte index, bool defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
System.Boolean | defaultValue | Default value if Application info field index does not exist. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetValueForEnum<T>(Byte, Byte)
Get the application info field value for enum
of type T.
Declaration
public byte GetValueForEnum<T>(byte index, byte defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
System.Byte | defaultValue | Default value if Application info field index does not exist. |
Returns
Type | Description |
---|---|
System.Byte | Application info field value or |
Type Parameters
Name | Description |
---|---|
T | Enum type to verify values against. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
GetValues()
Get the raw Service Class Application Information field.
Declaration
public byte[] GetValues()
Returns
Type | Description |
---|---|
System.Byte[] | Service Class Application Information field. |
Remove(Byte)
Removes the field with the specified index from the Service Class Application Info.
Declaration
public bool Remove(byte index)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | Application info field index. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |
Overrides
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through the Application Info fields.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Enumerator for the Application Info fields. |