Leadtools.Mrc Namespace > MrcSegmenter Class : CombineSegments Method |
'Declaration Public Sub CombineSegments( _ ByVal id1 As Integer, _ ByVal id2 As Integer, _ ByVal flags As MrcCombineSegmentFlags, _ ByVal factor As Integer _ )
'Usage Dim instance As MrcSegmenter Dim id1 As Integer Dim id2 As Integer Dim flags As MrcCombineSegmentFlags Dim factor As Integer instance.CombineSegments(id1, id2, flags, factor)
Public Sub CombineSegmentsExample() ' Load an image Dim codecs As RasterCodecs = New RasterCodecs() codecs.ThrowExceptionsOnInvalidImages = True Dim image As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.mrc")) Dim segmenter As MrcSegmenter = New MrcSegmenter(image, Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.sgm")) segmenter.CombineSegments(0, 1, MrcCombineSegmentFlags.CombineForce, 20) End Sub Public NotInheritable Class LEAD_VARS Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images" End Class
public void CombineSegmentsExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"MRCSegmentation.mrc")); MrcSegmenter segmenter = new MrcSegmenter(image,Path.Combine(LEAD_VARS.ImagesDir,"MRCSegmentation.sgm")); segmenter.CombineSegments(0, 1, MrcCombineSegmentFlags.CombineForce, 20); } static class LEAD_VARS { public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images"; }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2