LoadImage Method

Summary
Loads an MRC image file into an image. The file can be in any supported image file format.
Syntax
C#
C++/CLI
Python
public static RasterImage LoadImage( 
   string fileName, 
   int pageNumber 
) 
public: 
static RasterImage^ LoadImage(  
   String^ fileName, 
   int pageNumber 
)  
def LoadImage(self,fileName,pageNumber): 

Parameters

fileName
file to be loaded.

pageNumber
The page number of a multipage file, which can contain more than one image. When loading a file, this is the exact page number. For more information on multipage files refer to Multipage File Formats.

Remarks

This method loads the MRC image files that were saved using either LEAD Proprietary T44 Format or Standard T44 Format. You can also use Leadtools.Codecs.RasterCodecs.Load(System.Uri,System.Int32,Leadtools.Codecs.CodecsLoadByteOrder,System.Int32,System.Int32) method to load the MRC image file. For information about loading capabilities, refer to MRC Loading Capabilities.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Mrc; 
 
public void LoadImageExample() 
{ 
   String fileName = Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.mrc"); 
   int lastPage = MrcSegmenter.GetPagesCount(fileName); 
   RasterImage image = MrcSegmenter.LoadImage(fileName, lastPage); 
} 
 
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.