DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImageCollection Class / Clone Method
Example

In This Topic
    Clone Method (DicomImageCollection)
    In This Topic
    Returns a Shallow copy of the DicomImageCollection
    Syntax
    'Declaration
     
    
    Public Overridable Function Clone() As System.Object
    public virtual System.object Clone()

    Return Value

    Remarks

    This method makes a Shallow Copy of the DicomImageCollection.

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

    Example
    DicomImageCollection imageCollection = new DicomImageCollection();
                        
    DicomImage image1 = new DicomImage("your_dicom_image1.dcm");
    DicomImage image2 = new DicomImage("your_dicom_image2.dcm");
    DicomImage image3 = new DicomImage("your_dicom_image3.dcm");
                        
    imageCollection.Add(image1);
    imageCollection.Add(image2);
    imageCollection.Add(image3);
                        
    DicomImageCollection clonedCollection = (DicomImageCollection)imageCollection.Clone();
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also