Leadtools.Dicom Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
GetValue Method
See Also 
Leadtools.Dicom Namespace > DicomDataSet Class : GetValue Method



Overload List

OverloadDescription
Generic GetValue(DicomElement,Boolean,Int64,T,GetValueDelegate) Returns the value of a DICOM element  
Generic GetValue(DicomElement,T,GetValueDelegate) Returns the value of a DICOM element  
Generic GetValue(Int64,T,GetValueDelegate) Returns the value of a DICOM element  
Generic GetValue(DicomElement,T) Returns the value of a DICOM element  
Generic GetValue(Int64,T) Returns the value of a DICOM element  
Generic GetValue(DicomElement,Boolean,Int64,T) Returns the value of a DICOM element  
Generic GetValue(DicomElement,T,T)  
Generic GetValue(Int64,T,T)  

Remarks

There are many overloads for this method.

This method is used to retrieve a value from a DICOM element It is very flexible method that can be used to retrieve the value as any of the types below, regardless of the DicomVRType The caller specificies the type T of the value, and the value is converted to this type if possible. The generic type T Object can be any of the following:

The versions of GetValue that take a delegate can be used to retrieve ANY type, even if it is not native to DicomDataSet. The data is extracted from the value as a string passed to the provided method. The delegate is optional. Pass null if you do not want to use a delegate. Look at the example to see how to use the delegate. Below is a list of the overloads that take a delegate:

Some versions of GetValue return a reference to DicomDataSet, and return the value as an out parameter. These overloads are intended to be used by chaining them together, to make a very human readable code. See the part of the example that refers to a fluent interface to see how this is done. Below is a list of the overloads that return the type as an out parameter.

  • Generic GetValue(DicomElement,T,out T)
  • Generic GetValue(Int64,T,out T)

Some versions of GetValue have a parameter tag. For these versions, a search is done in the data set for an element that has this tag. Some of these overloads may also have element and tree parameters. If so, the search for tag starts at element. The search on the data set is performed as a list or tree depending on the tree parameter. For details on the element and tree parameters, see FindFirstElement

Other versions of this method do not have a tag parameter. In this case, a reference to the actual element is passed to the function, and the value of this element is returned.

All versions of this method take a defaultValue parameter. This is the value that is returned (or to which the out parameter is set) if the method cannot retrieve the actual value of the element, or if the element has no value. To see if this is the case, check the value of the property DicomDataSet.GetValueResult.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Dicom requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features