- element
- An item in the data set.
- tree
- true to evaluate the Data Set as a tree; false to evaluate the Data Set as a list.
- tag
- Tag of the item to find or insert.
- value
- value to insert
Visual Basic (Declaration) | |
---|---|
Overloads Public Function InsertElementAndSetValue( _ ByVal element As DicomElement, _ ByVal tree As Boolean, _ ByVal tag As Long, _ ByVal value As Object _ ) As DicomDataSet |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public DicomDataSet InsertElementAndSetValue( DicomElement element, bool tree, long tag, object value ) |
C++/CLI | |
---|---|
public: DicomDataSet^ InsertElementAndSetValue( DicomElement^ element, bool tree, long tag, Object^ value ) |
Parameters
- element
- An item in the data set.
- tree
- true to evaluate the Data Set as a tree; false to evaluate the Data Set as a list.
- tag
- Tag of the item to find or insert.
- value
- value to insert
Return Value
A reference to the DicomDataSet class (a 'this' pointer)This example shows how to set the value of various DICOM elements, regardless of the DicomVRType or the multiplicity.
Visual Basic | Copy Code |
---|---|
''' |
C# | Copy Code |
---|---|
/// |
This method is used to set the value of an existing DICOM data set element, or if the existing element does not already exist, to insert the element and then set its value. The value parameter can be any supported DICOM value. For details on the value parameter, see SetValue
This method returns a reference to the DicomDataSet class so that it can be used as part of a fluent interface. After calling this method, the DicomDataSet.InsertElementAndSetValueResult property contains a value that indiciates the success of the method. For an example of how this can be used efficiently to create a DICOM sequence, see BeginEditSequence
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
Reference
DicomDataSet ClassDicomDataSet Members
Overload List
SetValue Method
InsertElementAndSetValue(Int64,Object) Method
InsertElementAndSetValue(DicomElement,Boolean,Int64,Object) Method
InsertElementAndSetValueResult Property
BeginEditSequence(DicomElement,Boolean,Int64) Method
EndEditSequence Method
BeginEditItem(Int32) Method
EndEditItem Method