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




Converts an unsigned image to signed.

Syntax

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

Example

Visual BasicCopy Code
ImageProcessing.Core.ConvertUnsignedToSignedCommand
   Public Sub ConvertUnsignedToSignedCommandExample()
      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 ConvertUnsignedToSignedCommand = New ConvertUnsignedToSignedCommand
      command.Type = ConvertUnsignedToSignedCommandType.ProcessRangeOnly
      'convert image to signed.
      command.Run(leadImage)

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Core.ConvertUnsignedToSignedCommand 
      public void ConvertUnsignedToSignedCommandExample() 
      { 
         // 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 
         ConvertUnsignedToSignedCommand command = new ConvertUnsignedToSignedCommand(); 
         command.Type   = ConvertUnsignedToSignedCommandType.ProcessRangeOnly; 
         //convert image to signed. 
         command.Run(image); 
 
         RasterCodecs.Shutdown(); 
      }

Remarks

  • This class updates the minimum and maximum values of the image with new values that consider the image's new signed values.
  • This class supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.
  • This command does not support 32-bit grayscale images.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Core.ConvertUnsignedToSignedCommand

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