←Select platform

Type Property

Summary
Gets or sets a flag that indicates the type of operation.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public UserFilterCommandType Type { get; set; } 
@property (nonatomic, assign) LTUserFilterCommandType type; 
public UserFilterCommandType getType(); 
public void setType( 
   UserFilterCommandType userFilterCommandType 
); 
public: 
property UserFilterCommandType Type { 
   UserFilterCommandType get(); 
   void set (    UserFilterCommandType ); 
} 
Type # get and set (UserFilterCommand) 

Property Value

Flag that indicates the type of operation.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Effects; 
 
 
public void UserFilterCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "IMAGE1.CMP")); 
 
   // Prepare the command 
   int i, j; 
   UserFilterCommand command = new UserFilterCommand(); 
   command.CenterPoint = new LeadPoint(1, 1); 
   command.Divisor = 1; 
   command.Offset = 0; 
   command.Type = UserFilterCommandType.Sum; 
   command.FilterHeight = 3; 
   command.FilterWidth = 3; 
   command.Matrix = new int[9]; 
 
   // Initialize the array with factor used to apply the high pass filter. 
   for (i = 0; i < 3; i++) 
   { 
      for (j = 0; j < 3; j++) 
      { 
         if (j == 1 || i == 1) 
         { 
            if (j == 1 && i == 1) 
               command.Matrix[i * 3 + j] = 5; 
            else 
               command.Matrix[i * 3 + j] = -1; 
         } 
         else 
            command.Matrix[i * 3 + j] = 0; 
      } 
   } 
 
   // Apply the high pass custom filter. 
   command.Run(image); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

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

Leadtools.ImageProcessing.Effects Assembly

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