LEADTOOLS Image Processing (Leadtools.ImageProcessing.Core assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
AnisotropicDiffusionCommand Class
See Also  Members  
Leadtools.ImageProcessing.Core Namespace : AnisotropicDiffusionCommand Class



Performs a 2-Dimensional Anisotropic Diffusion filter on an image for reduction of varied patterned and non-patterned noise.

Object Model

AnisotropicDiffusionCommand Class

Syntax

Visual Basic (Declaration) 
Public Class AnisotropicDiffusionCommand 
   Inherits Leadtools.ImageProcessing.RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As AnisotropicDiffusionCommand
C# 
public class AnisotropicDiffusionCommand : Leadtools.ImageProcessing.RasterCommand, IRasterCommand  
C++/CLI 
public ref class AnisotropicDiffusionCommand : public Leadtools.ImageProcessing.RasterCommand, IRasterCommand  

Example

Runs the AnisotropicDiffusionCommand on the Image.

Visual BasicCopy Code
Public Sub AnisotropicDiffusionCommandExample()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"))

   ' Prepare the command
   Dim command As AnisotropicDiffusionCommand = New AnisotropicDiffusionCommand
   'Apply 
   command.Iterations = 20
   command.Smoothing = 1
   command.TimeStep = 100.0F
   command.MinVariation = 0.5F
   command.MaxVariation = 0.8F
   command.EdgeHeight = 4.0F
   command.Update = 10


End Sub

Public NotInheritable Class LEAD_VARS
   Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
C#Copy Code
public void AnisotropicDiffusionCommandExample()
   {
      // Load an image
      RasterCodecs codecs = new RasterCodecs();
      codecs.ThrowExceptionsOnInvalidImages = true;

      RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"));

      // Prepare the command
      AnisotropicDiffusionCommand command = new AnisotropicDiffusionCommand();
      //Apply 
      command.Iterations = 20;
      command.Smoothing = 1;
      command.TimeStep = 100.0f;
      command.MinVariation = 0.5f;
      command.MaxVariation = 0.8f;
      command.EdgeHeight = 4.0f;
      command.Update = 10;
      command.Run(image);
   }

static class LEAD_VARS
{
   public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
SilverlightCSharpCopy Code
SilverlightVBCopy Code

Remarks

  • This function is dedicated to reduction of noise in images, more specifically medical images. Images with a great amount of periodic noise in them are better suited to be clarified using this filter.
  • The number of iterations controls the number of times the filter will be performed on image. The lower the variable is, the faster the filter will perform. Higher iterations typically means clearer results, yet it depends on the maximum length of vectors that can be computed from the image to obtain the best results
  • The higher the time step variable is, the larger of a range of vectors is used for the next iteration, yet too high a value, will yield out of range results as it will exceed the maximum vectors at some spots
  • The variable update is very useful when using a large number of iterations on a large image, especially when the results are not known. This variable, updates the image every number Update iterations, thus the progress of the de-noising can be witnessed. If the image has a region, the function will be performed on the region only.
  • This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available in the Document and Medical Imaging toolkits.s

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Core.AnisotropicDiffusionCommand

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also