DicomObjects.NET Core Documentation
DicomObjects Namespace / DicomDataSet Class / Add Method / Add(Keyword,String,Object) Method

The DICOM Keyword of the data element.

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

The Value to be assigned




In This Topic
    Add(Keyword,String,Object) Method
    In This Topic
    Creates and adds standard data elements to DicomDataSet
    Syntax
    'Declaration
     
    
    Public Overloads Sub Add( _
       ByVal Keyword As Keyword, _
       ByVal VR As String, _
       ByVal Value As Object _
    ) 
    'Usage
     
    
    Dim instance As DicomDataSet
    Dim Keyword As Keyword
    Dim VR As String
    Dim Value As Object
     
    instance.Add(Keyword, VR, Value)
    public void Add( 
       Keyword Keyword,
       string VR,
       object Value
    )
    public:
    void Add( 
       Keyword Keyword,
       String^ VR,
       Object^ Value
    ) 

    Parameters

    Keyword

    The DICOM Keyword of the 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 add standard elements, VR of which will be determined by the internal dictionary. The type of value required for the "Value" parameter depends on the value representation of the data element, as defined by the values of group and element. 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.

    Although this method, taking a string as the keyword is available, where possible the aternative overload, taking an Enums.Keyword is preferable.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also