LEADTOOLS MRC (Leadtools.Mrc assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
MrcSegmenter Constructor(RasterImage,String)
See Also  Example
Leadtools.Mrc Namespace > MrcSegmenter Class > MrcSegmenter Constructor : MrcSegmenter Constructor(RasterImage,String)



image
Image that contains size information used to clip the segments.
fileName
The output file.

The MrcSegmenter Constructor(RasterImage,String) is available in LEADTOOLS Document and Medical Imaging toolkits.

Loads segments from a file.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal image As RasterImage, _
   ByVal fileName As String _
)
Visual Basic (Usage)Copy Code
Dim image As RasterImage
Dim fileName As String
 
Dim instance As New MrcSegmenter(image, fileName)
C# 
public MrcSegmenter( 
   RasterImage image,
   string fileName
)
C++/CLI 
public:
MrcSegmenter( 
   RasterImage^ image,
   String^ fileName
)

Parameters

image
Image that contains size information used to clip the segments.
fileName
The output file.

Example

Visual BasicCopy Code
Public Sub MrcSegmenterConstructorExample()
      ' Load an image
      Dim codecs As RasterCodecs = New RasterCodecs()

      Dim image As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.mrc"))

      Dim LoadedSegmenter As MrcSegmenter = New MrcSegmenter(image, Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.sgm"))
   End Sub

Public NotInheritable Class LEAD_VARS
   Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
C#Copy Code
public void MrcSegmenterConstructorExample()
   {
      // Load an image
      RasterCodecs codecs = new RasterCodecs();

      RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"MRCSegmentation.mrc"));

      MrcSegmenter LoadedSegmenter = new MrcSegmenter(image,Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.sgm"));
   }

static class LEAD_VARS
{
   public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}

Remarks

This constructor loads the segments from a file.

Call MrcSegmenter.EnumerateSegments to enumerate the segments.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Reference

MrcSegmenter Class
MrcSegmenter Members
Overload List
Save Method
Programming with LEADTOOLS MRC

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