SegmentType Property

Summary
Gets or sets the segment type.
Syntax
C#
C++/CLI
Python
public MrcSegmentType SegmentType { get; set; } 
public: 
property MrcSegmentType SegmentType { 
   MrcSegmentType get(); 
   void set (    MrcSegmentType ); 
} 
SegmentType # get and set (MrcSegmentData) 

Property Value

All possible values are found in MrcSegmentType.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Mrc; 
 
public void AddSegmentExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "PDFSegmentation.pdf")); 
 
   MrcSegmentData data = MrcSegmentData.Empty; 
   MrcSegmenter mrcSegmenter = new MrcSegmenter(image, RasterColor.FromKnownColor(RasterKnownColor.White), RasterColor.FromKnownColor(RasterKnownColor.Black)); 
   data.ImageSegment = new LeadRect(0, 0, 20, 60); 
 
   data.SegmentType = MrcSegmentType.Picture; 
   mrcSegmenter.AddSegment(image, data); 
} 
 
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.