DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / Clone Method / Clone(Boolean) Method

If true then returns a Deep copy of the DicomImage, otherwise returns a Shallow copy.

Example

In This Topic
    Clone(Boolean) Method
    In This Topic
    Returns a cloned copy of the DicomImage
    Syntax
    'Declaration
     
    
    Public Overloads Overridable Function Clone( _
       ByVal Deep As System.Boolean _
    ) As System.Object
    public virtual System.object Clone( 
       System.bool Deep
    )

    Parameters

    Deep

    If true then returns a Deep copy of the DicomImage, otherwise returns a Shallow copy.

    Return Value

    Remarks

    This method makes either a Shallow Copy or a Deep Copy of the DicomImage, dependants on the Deep parameter.

    A shallow copy will only have the top level objects replicated, any referenced objects under the top level will be shared by the original DicomImage and the cloned copy.

    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    var clonedImage = image.Clone(true);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also