Save Method
Summary
Saves the segments to a specific file.
Syntax
Public Sub Save( _
ByVal fileName As String _
)
Parameters
fileName
The output file name.
Example
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Mrc;
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:\LEADTOOLS21\Resources\Images";
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Mrc
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:\LEADTOOLS21\Resources\Images"
End Class