DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomDataSet Class / Value Method / Value(Int32,Int32) Method

The group index of the specified Data Element

The element index of the specified Data Element

Example

In This Topic
    Value(Int32,Int32) Method
    In This Topic
    Returns the value of the specified Data Element
    Syntax
    'Declaration
     
    
    Public Overloads Function Value( _
       ByVal group As System.Integer, _
       ByVal element As System.Integer _
    ) As System.Object
    public System.object Value( 
       System.int group,
       System.int element
    )

    Parameters

    group

    The group index of the specified Data Element

    element

    The element index of the specified Data Element

    Return Value

    object
    Remarks

    The type of variant returned depends on the value representation of the data element, and may be a string, date (for time, date or date-time), or a numeric type, including floating point values where appropriate.

    Data elements of types not known to the program, whether private elements, or attributes recently defined by DICOM return the string " Unknown Data Type".

    Example
    DicomDataSet ds = new DicomDataSet("Dataset.dcm");
    int group = 0x0010;
    int element = 0x0010;
                        
    var patientName = ds.Value(group, element);
    Debug.WriteLine($"Patient Name: {patientName}"); // Example output: Patient Name: John Doe
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also