DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / Add Method / Add(Int32,Int32,String,Object) Method

The group index of a data element.

The element index of a data element.

The value representation (2 character string) of the data element to be added

The Value to be assigned







In This Topic
    Add(Int32,Int32,String,Object) Method
    In This Topic
    Creates and adds standard data elements with specified VR to the underlying DicomDataSet
    Syntax
    'Declaration
     
    
    Public Overloads Sub Add( _
       ByVal Group As System.Integer, _
       ByVal Element As System.Integer, _
       ByVal VR As System.String, _
       ByVal Value As System.Object _
    ) 
    'Usage
     
    
    Dim instance As DicomImage
    Dim Group As System.Integer
    Dim Element As System.Integer
    Dim VR As System.String
    Dim Value As System.Object
     
    instance.Add(Group, Element, VR, Value)
    public void Add( 
       System.int Group,
       System.int Element,
       System.string VR,
       System.object Value
    )
    public procedure Add( 
        Group: System.Integer;
        Element: System.Integer;
        VR: System.String;
        Value: System.TObject
    ); 
    public function Add( 
       Group : System.int,
       Element : System.int,
       VR : System.String,
       Value : System.Object
    );
    public: void Add( 
       System.int Group,
       System.int Element,
       System.string* VR,
       System.Object* Value
    ) 
    public:
    void Add( 
       System.int Group,
       System.int Element,
       System.String^ VR,
       System.Object^ Value
    ) 

    Parameters

    Group

    The group index of a data element.

    Element

    The element index of a data element.

    VR

    The value representation (2 character string) of the data element to be added

    Value

    The Value to be assigned

    Remarks

    This method is to explicitly add elements with specified VR. The type of value required for the "Value" parameter depends on the value representation of the data element, as defined by either by the VR parameter. Values of the types are always acceptable, as are values of other types that can be suitably coerced. Variants of type "null" are also accepted, resulting a zero-length data element, which can be useful in raw queries and for �type 2� elements. There are some special conditions relating to date and time types.

    To create a sequence, value may be a DicomDataSetCollection.

    If the data element being added has a potential value multiplicity (VM) of >1, then value may be either an array or scalar, but if the element�s VM is always 1, then an attempt to assign an array will generate an error.

    Any existing data element with the same group and element will be silently replaced, even if it is an array.

    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also