- element
- An item in the Data Set.
- value
- >An Object that can be any supported type, or an array of any supported type.
Visual Basic (Declaration) | |
---|---|
Public Function SetValue( _ ByVal element As DicomElement, _ ByVal value As Object _ ) As Boolean |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public bool SetValue( DicomElement element, object value ) |
C++/CLI | |
---|---|
public: bool SetValue( DicomElement^ element, Object^ value ) |
Parameters
- element
- An item in the Data Set.
- value
- >An Object that can be any supported type, or an array of any supported type.
Return Value
true if the object value(s) were set successfully. false if could not set the object value(s) of the Data Element.This example shows how to set the value of various DICOM elements, regardless of the regardless of the DicomVRType or the multiplicity.
Visual Basic | Copy Code |
---|---|
''' |
C# | Copy Code |
---|---|
/// |
Note: The user is responsible to allocate the memory for value.
This is very flexible function that can be used to set the value of almost any DICOM data element, regardless of the DicomVRType The Object can be any of the following:
- String
- Byte
- DateTime
- DicomDateValue
- DicomTimeValue
- DicomDateTimeValue
- Int32
- Int16
- Double
- Single
- an array of any of the above types
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
Reference
DicomDataSet ClassDicomDataSet Members
SetValue Method
SetIntValue(DicomElement,Int32[],Int32) Method
SetShortValue(DicomElement,Int16[],Int32) Method
SetByteValue(DicomElement,Byte[],Int32) Method
SetBinaryValue(DicomElement,Byte[],Int32) Method
SetStringValue(DicomElement,String[],DicomCharacterSetType) Method
SetFloatValue(DicomElement,Single[],Int32) Method
SetDoubleValue(DicomElement,Double[],Int32) Method
SetAgeValue Method
SetDateValue(DicomElement,DicomDateValue[]) Method
SetTimeValue(DicomElement,DicomTimeValue[]) Method
SetDateTimeValue(DicomElement,DicomDateTimeValue[]) Method
SetConvertValue Method