remove()

Description

Removes multiple images with specified indices in the buffer.

Syntax

ImageViewerObject.image.remove(indices)

Parameters

<int[]> indices: specifies the indices of images to be removed in the buffer. The index is 0-based.

Return value

bool

true indicates success. false indicates failure.

When false is returned, check getErrorCode() or getErrorString() for error information.

Example

             var imageviewer = DCSObject.getImageViewer ("ImageViewerContainer");  // Get a specified image viewer
             var arr = [];
             for (var i = 0; i < imageviewer.image.getCount(); i ++) {  //Select all the images in the image viewer
                 arr.push(i);
             }
             imageviewer.image.remove(arr); //Remove all images in the image viewer
             
      

See also

.image.setSelectedIndices()
.image.getSelectedIndices()