Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
MultiscaleEnhancementCommand Class
See Also  Members   Example 
Leadtools.ImageProcessing.Core Namespace : MultiscaleEnhancementCommand Class




Enhances an image's contrast, edges, and density range for use in Computed Radiography (CR), in a way that all relevant image features are rendered with an appropriate level of visibility. This command is available in the Medical toolkits.

Syntax

Visual Basic (Declaration) 
Public Class MultiscaleEnhancementCommand 
   Inherits RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As MultiscaleEnhancementCommand
C# 
public class MultiscaleEnhancementCommand : RasterCommand, IRasterCommand  
Managed Extensions for C++ 
public __gc class MultiscaleEnhancementCommand : public RasterCommand, IRasterCommand  
C++/CLI 
public ref class MultiscaleEnhancementCommand : public RasterCommand, IRasterCommand  

Example

Visual BasicCopy Code
ImageProcessing.Core.MultiscaleEnhancementCommand
   Public Sub MultiScaleEnhancementCommandExample()
      RasterCodecs.Startup()
      Dim codecs As New RasterCodecs()
      codecs.ThrowExceptionsOnInvalidImages = True

      Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")

      ' Prepare the command
      Dim command As MultiscaleEnhancementCommand = New MultiscaleEnhancementCommand
      command.Contrast = 2000
      command.EdgeLevels = 4
      command.EdgeCoefficient = -1
      command.LatitudeLevels = 0
      command.LatitudeCoefficient = 0
      command.Type = MultiscaleEnhancementCommandType.Gaussian
      command.Flags = MultiscaleEnhancementCommandFlags.EdgeEnhancement
      ' Apply multiscale enhancement
      command.Run(leadImage)

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Core.MultiscaleEnhancementCommand 
      public void MultiScaleEnhancementCommandExample() 
      { 
         // Load an image 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
         codecs.ThrowExceptionsOnInvalidImages = true; 
 
         RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); 
 
         // Prepare the command 
         MultiscaleEnhancementCommand command = new MultiscaleEnhancementCommand(); 
         command.Contrast = 2000; 
         command.EdgeLevels = 4; 
         command.EdgeCoefficient = -1; 
         command.LatitudeLevels = 0; 
         command.LatitudeCoefficient = 0; 
         command.Type = MultiscaleEnhancementCommandType.Gaussian; 
         command.Flags = MultiscaleEnhancementCommandFlags.EdgeEnhancement; 
         // Apply multiscale enhancement 
         command.Run(image); 
 
         RasterCodecs.Shutdown(); 
      }

Remarks

  • The command wraps techniques of image enhancements, such as contrast enhancement, edge enhancement and latitude reduction, for Computed Radiography (CR).
  • In multi scale enhancement, the image is decomposed into components or levels. Those components or levels that contain details will be enhanced separately from other components or levels.
  • This will improve the visualization for the subtle image features without the risk of losing information of other features.
  • To find the number of levels in any image follow this equation:
  • MaximumLevels = ceil( log( max(pimage->Width, pimage->Height)) / log(2));
  • The command will consider values larger than 10000 for contrast as 10000. If the user used a conttrast of 0, then image contrast will not be improved.
  • Best results are obtained if contrast is in the range of 15 ~ 30. The larger the value the stronger the enhancement will be. Any stronger enhancement than 30 will reveal noise and no new enhancement will be noticed.
  • The user can further enhance the image withT:Leadtools.ImageProcessing.Core.MultiscaleEnhancementCommandFlagsEdgeEnhancement) and/or
  • latitude reduction T:Leadtools.ImageProcessing.Core.MultiscaleEnhancementCommandFlags Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical:T:Leadtools.Topics.RasterProDocMed
For more information, refer to Changing Brightness and Contrast:T:Leadtools.Topics.ChangingBrightnessAndContrast%.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Core.MultiscaleEnhancementCommand

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also