Deletes a segment.
Syntax
Visual Basic (Declaration) | |
---|
Public Sub DeleteSegment( _
ByVal id As Integer _
) |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As MrcSegmenter
Dim id As Integer
instance.DeleteSegment(id)
|
C# | |
---|
public void DeleteSegment(
int id
) |
Managed Extensions for C++ | |
---|
public: void DeleteSegment(
int id
) |
C++/CLI | |
---|
public:
void DeleteSegment(
int id
) |
Parameters
- id
- Segment identifier.
Example
Visual Basic | Copy Code |
---|
<Test> _
Public Sub DeleteSegmentExample()
RasterCodecs.Startup()
Dim codecs As RasterCodecs = New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim image As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")
Dim segmenter As MrcSegmenter = New MrcSegmenter(image, Color.White, Color.Black)
segmenter.SegmentImage(image, MrcSegmentImageOptions.Empty)
If segmenter.EnumerateSegments(Nothing) > 0 Then
segmenter.DeleteSegment(0)
End If
End Sub |
C# | Copy Code |
---|
public void DeleteSegmentExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); MrcSegmenter segmenter = new MrcSegmenter(image, Color.White, Color.Black); segmenter.SegmentImage(image, MrcSegmentImageOptions.Empty); if (segmenter.EnumerateSegments(null) > 0) segmenter.DeleteSegment(0); } |
Remarks
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