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



fileName
The output file name.

The Save Method is available in LEADTOOLS Document and Medical Imaging toolkits.

fileName
The output file name.
Saves the segments to a specific file.

Syntax

Visual Basic (Declaration) 
Public Sub Save( _
   ByVal fileName As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As MrcSegmenter
Dim fileName As String
 
instance.Save(fileName)
C# 
public void Save( 
   string fileName
)
C++/CLI 
public:
void Save( 
   String^ fileName
) 

Parameters

fileName
The output file name.

Example

Visual BasicCopy Code
Public Sub SaveExample()
      ' 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 mrcSegmenter As MrcSegmenter = New MrcSegmenter(image, Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.sgm"))

      mrcSegmenter.Save(Path.Combine(LEAD_VARS.ImagesDir, "SaveExampleResult.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 SaveExample()
   {
      // Load an image
      RasterCodecs codecs = new RasterCodecs();
      codecs.ThrowExceptionsOnInvalidImages = true;

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

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

      mrcSegmenter.Save(Path.Combine(LEAD_VARS.ImagesDir,"SaveExampleResult.sgm"));
   }

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

Remarks

This method is used to export the resulted segments into a binary format. For more information, refer to Programming with LEADTOOLS MRC.

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

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