LEADTOOLS Medical (Leadtools.Dicom assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
Copy(DicomDataSet,DicomElement,DicomElement) Method
See Also 
Leadtools.Dicom Namespace > DicomDataSet Class > Copy Method : Copy(DicomDataSet,DicomElement,DicomElement) Method



dataSet
The Data Set to be copied (the source Data Set).
destination
A data element within the destination Data Set. A copy of the source Data Set will be inserted as the child of this data element.
source
A data element within the source Data Set. All children, grandchildren, etc., of this element will be added to the destination Data Set.
dataSet
The Data Set to be copied (the source Data Set).
destination
A data element within the destination Data Set. A copy of the source Data Set will be inserted as the child of this data element.
source
A data element within the source Data Set. All children, grandchildren, etc., of this element will be added to the destination Data Set.
Copies the data elements from one Data Set to another. Supported in Silverlight, Windows Phone 7.

Syntax

Visual Basic (Declaration) 
Overloads Public Sub Copy( _
   ByVal dataSet As DicomDataSet, _
   ByVal destination As DicomElement, _
   ByVal source As DicomElement _
) 
Visual Basic (Usage)Copy Code
Dim instance As DicomDataSet
Dim dataSet As DicomDataSet
Dim destination As DicomElement
Dim source As DicomElement
 
instance.Copy(dataSet, destination, source)
C# 
public void Copy( 
   DicomDataSet dataSet,
   DicomElement destination,
   DicomElement source
)
C++/CLI 
public:
void Copy( 
   DicomDataSet^ dataSet,
   DicomElement^ destination,
   DicomElement^ source
) 

Parameters

dataSet
The Data Set to be copied (the source Data Set).
destination
A data element within the destination Data Set. A copy of the source Data Set will be inserted as the child of this data element.
source
A data element within the source Data Set. All children, grandchildren, etc., of this element will be added to the destination Data Set.

Example

For an example, refer to InitializeCommandSet.

Remarks

If both source and destination are null, the source Data Set will be inserted at the root level of the destination Data Set. Therefore the highest level elements of the source Data Set will be added as siblings to the highest level elements of the destination Data Set. This can be seen in the diagram below.

If source is not null and destination is null, the children of source will be added at the root level of the destination Data Set (i.e., as siblings to elements at the highest level). This can be seen in the diagram below. Note that the source elements to be added are in blue.

If source is null and destination is not null, the entire source Data Set will be added as children to destination. This can be seen in the diagram below.

If source and destination are both not null, then the children of source are added as the children of destination. This can be seen in the diagram below. The original children of destination are in red and the source elements to be added are in blue.

If an inserted element has the same tag value as a destination element at the same level and with the same parent, then the value from the source element is copied into the destination element and any child elements are added accordingly. For example, the diagram below shows the result of a call to Copy(DicomDataSet,DicomElement,DicomElement). If the two elements indicated by the arrows have the same tag value, the value from the source element is copied into the destination element and the structure on the right results. This is shown by the red outline of the destination element with the blue center of the source element.

To make the destination Data Set an exact copy of the source Data Set, instead of inserting it within the destination Data Set, you must call Leadtools.Dicom.DicomDataSet.Reset on the destination Data Set, before calling Copy(DicomDataSet,DicomElement,DicomElement).

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

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