GetPagesCount Method

Summary
Gets the number of pages in an MRC file.
Syntax
C#
C++/CLI
Python
public static int GetPagesCount( 
   string fileName 
) 
public: 
static int GetPagesCount(  
   String^ fileName 
)  
def GetPagesCount(self,fileName): 

Parameters

fileName
MRC file name.

Remarks

Use this method to get the number of pages in an MRC file.

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.