LEADTOOLS MRC (Leadtools.Mrc assembly)

LoadImage Method

Show in webframe
Example 





file to be loaded.
The page number of a multi-page file, which can contain more than one image. When loading a file, this is the exact page number. For more information on multi-page files refer to Multipage File Formats.
Loads an MRC image file into an image. The file can be in any supported image file format.
Syntax
public static RasterImage LoadImage( 
   string fileName,
   int pageNumber
)
'Declaration
 
Public Shared Function LoadImage( _
   ByVal fileName As String, _
   ByVal pageNumber As Integer _
) As RasterImage
'Usage
 
Dim fileName As String
Dim pageNumber As Integer
Dim value As RasterImage
 
value = MrcSegmenter.LoadImage(fileName, pageNumber)

            

            
public:
static RasterImage^ LoadImage( 
   String^ fileName,
   int pageNumber
) 

Parameters

fileName
file to be loaded.
pageNumber
The page number of a multi-page file, which can contain more than one image. When loading a file, this is the exact page number. For more information on multi-page 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
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Mrc

Public Sub LoadImageExample()
   Dim fileName As String = Path.Combine(LEAD_VARS.ImagesDir, "MRCSegmentation.mrc")
   Dim lastPage As Integer = MrcSegmenter.GetPagesCount(fileName)
   Dim image As RasterImage = MrcSegmenter.LoadImage(fileName, lastPage)
End Sub

Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
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:\Users\Public\Documents\LEADTOOLS Images";
}
Requirements

Target Platforms

See Also

Reference

MrcSegmenter Class
MrcSegmenter Members
SegmentImage Method
SaveImage Method
SaveImageT44 Method
GetPagesCount Method
Save Method
SaveBitmapList Method
Programming with LEADTOOLS MRC

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.

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