Interface IElement

Interface IElement

Namespace: Aspose.Medical.Dicom.Elements
Assembly: Aspose.Medical.dll (25.11.0)

Represents a basic DICOM data element.

public interface IElement

Properties

Count

The number of elements contained in this element. Read-only System.Int32.

int Count { get; }

Property Value

int

Data

This element’s untyped data. Read-only System.Collections.Generic.IEnumerable`1 of System.Object.

IEnumerable<object> Data { get; }

Property Value

IEnumerable < object &gt;

Tag

The DICOM tag associated with the element. Read-only Aspose.Medical.Dicom.Elements.IElement.Tag.

Tag Tag { get; }

Property Value

Tag

ValueRepresentation

The Value Representation of the element. Read-only Aspose.Medical.Dicom.Elements.IElement.ValueRepresentation.

ValueRepresentation ValueRepresentation { get; }

Property Value

ValueRepresentation

Methods

Get<t>(int)

Returns the element’s value at the specified position.

T Get<t>(int index)

Parameters

index int

The zero-based index of the element to retrieve.

Returns

T

The T value.

Type Parameters

T

Type of the return value.

Get<t>(Index)

Returns the element’s value at the specified position.

T Get<t>(Index index)

Parameters

index Index

The index of the element value to retrieve, which is either from the beginning or the end of the sequence.

Returns

T

The T value.

Type Parameters

T

Type of the return value.

GetOrDefault<t>(int)

Returns the element’s value at the specified position or a default value if the index is out of range.

T? GetOrDefault<t>(int index)

Parameters

index int

The zero-based index of the element value to retrieve.

Returns

T?

The T value.

Type Parameters

T

Type of the return value.

GetOrDefault<t>(Index)

Returns the element’s value at the specified position or a default value if the index is out of range.

T? GetOrDefault<t>(Index index)

Parameters

index Index

The index of the element value to retrieve, which is either from the beginning or the end of the sequence.

Returns

T?

The T value.

Type Parameters

T

Type of the return value.

GetValues<t>()

Returns the element’s values.

Span<t> GetValues<t>()

Returns

Span <t>

The element’s data.

Type Parameters

T

Type of the return value.

GetValues<t>(Range)

Returns the element’s values at the specified range.

Span<t> GetValues<t>(Range range)

Parameters

range Range

The range of the element values to retrieve.

Returns

Span <t>

The element’s data.

Type Parameters

T

Type of the return value.

TryGetValue<t>(int, out T?)

Gets the element’s value at the specified position.

bool TryGetValue<t>(int index, out T? value)

Parameters

index int

The index of the element value to retrieve, which is either from the beginning or the end of the sequence.

value T?

When this method returns, contains the value at the specified position (index); otherwise, contains the default value for the type of the value parameter.

Returns

bool

true if the element value could be extracted; otherwise, false.

Type Parameters

T

Type of the return value.

TryGetValue<t>(Index, out T?)

Gets the element’s value at the specified position.

bool TryGetValue<t>(Index index, out T? value)

Parameters

index Index

The index of the element value to retrieve, which is either from the beginning or the end of the sequence.

value T?

When this method returns, contains the value at the specified position (index); otherwise, contains the default value for the type of the value parameter.

Returns

bool

true if the element value could be extracted; otherwise, false.

Type Parameters

T

Type of the return value. </t></t></t></t></t></t></t></t></t></t>