Leadtools.Dicom Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
DeleteImage Method
See Also 
Leadtools.Dicom Namespace > DicomDataSet Class : DeleteImage Method




element
An item in the Data Set.
index
The zero-based index of the first frame to delete.
count
Value that represents the number of frames to delete from the Pixel Data Element.
Deletes one or more images from a Pixel Data element.

Syntax

Visual Basic (Declaration) 
Public Sub DeleteImage( _
   ByVal element As DicomElement, _
   ByVal index As Integer, _
   ByVal count As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As DicomDataSet
Dim element As DicomElement
Dim index As Integer
Dim count As Integer
 
instance.DeleteImage(element, index, count)
C# 
public void DeleteImage( 
   DicomElement element,
   int index,
   int count
)
Managed Extensions for C++ 
public: void DeleteImage( 
   DicomElement* element,
   int index,
   int count
) 
C++/CLI 
public:
void DeleteImage( 
   DicomElement^ element,
   int index,
   int count
) 

Parameters

element
An item in the Data Set.
index
The zero-based index of the first frame to delete.
count
Value that represents the number of frames to delete from the Pixel Data Element.

Example

For an example, refer to GetImage.

Remarks

As an example, if you wish to delete 50 images starting with the 50th frame in the Pixel Data, call this method with index set to 49 (the 50th frame in a zero-based index) and count set to 50.

Most DICOM files will only have one Data Element of type DicomTagType.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).

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Dicom requires a Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features