Leadtools.Dicom Namespace > DicomDataSet Class > DeleteImage Method : DeleteImage(DicomElement,Int32,Int32) Method |
'Declaration Public Overloads Sub DeleteImage( _ ByVal element As DicomElement, _ ByVal index As Integer, _ ByVal count As Integer _ )
'Usage Dim instance As DicomDataSet Dim element As DicomElement Dim index As Integer Dim count As Integer instance.DeleteImage(element, index, count)
public void deleteImage(DicomElement element, int index, int count)
Most DICOM files will only have one Data Element of type DicomTag.PixelData. Therefore, in most instances you can set element to null, since the method will automatically retrieve information about the image at the specified index within the only Pixel Data Element in the file. If element is not null, it must point to the Pixel Data Element itself.
If the DICOM file is DicomClassType.BasicDirectory, the file may contain more than one Pixel Data Element. In this case you must specify in element the Pixel Data Element from to delete the image(s).
If the DICOM dataset has a Multi-frame Functional Groups module that contains an item that has a Per-frame Functional Groups Sequenceitem, the corresponding item is removed from the dataset. If there is a Shared Functional Groups Sequence item, it will not be removed.