Save Method

Summary
Saves the segments to a specific file.
Syntax
C#
C++/CLI
Python
public void Save( 
   string fileName 
) 
public: 
void Save(  
   String^ fileName 
)  
def Save(self,fileName): 

Parameters

fileName
The output file name.

Remarks

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

Example
C#
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:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Mrc Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.