DicomObjects Reference
DicomObjects Reference / DicomImages Collection / Add Method
The Image to add
In This Topic
    Add Method
    In This Topic
    Description
    Adds a DicomImage to a DicomImages Collection
    Syntax
    Visual Basic
    Public Sub Add( _
       ByVal Image As Object _
    ) 
    Parameters
    Image
    The Image to add
    Remarks

    The new member is added at the end of the collection (it may subsequently be moved using Move if necessary). If the DicomImages collection to which an image is added belongs to a DicomViewer control, the control’s CurrentIndex property may be adjusted if AutoDisplay is True.
    As it is often useful to create multiple displayed versions of a single image, the display parameters are created as a new object, but they still reference the same underlying DICOM dataset, thereby conserving memory. Using this feature it is possible to show two versions of an image, showing different frames or with different magnification or windowing, without doubling the memory requirements.

    The parameter to this method is actually declared as a generic IDispatch object, allowing both DicomImage and DicomDataSet objects to be added to either type of collection. This is particularly useful when manipulating images embedded within sequences such as thumbnails within a DICOMDIR, as the object added acquires the type of the collection to which it is added, whilst retaining the same underlying DICOM dataset.

    See Also