LEADTOOLS Image Processing (Leadtools.ImageProcessing.Core assembly)

ConvertSignedToUnsignedCommand Constructor(ConvertSignedToUnsignedCommandType)

Show in webframe
Example 







Flag that indicates how the shift will be done.
Initializes a new ConvertSignedToUnsignedCommand class object with explicit parameters.
Syntax
public ConvertSignedToUnsignedCommand( 
   ConvertSignedToUnsignedCommandType type
)
'Declaration
 
Public Function New( _
   ByVal type As ConvertSignedToUnsignedCommandType _
)
'Usage
 
Dim type As ConvertSignedToUnsignedCommandType
 
Dim instance As New ConvertSignedToUnsignedCommand(type)
public ConvertSignedToUnsignedCommand( 
   ConvertSignedToUnsignedCommandType type
)
- (id)initWithType:(LTConvertSignedToUnsignedCommandType)type;
public ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType type)
function ConvertSignedToUnsignedCommand( 
   type 
)
public:
ConvertSignedToUnsignedCommand( 
   ConvertSignedToUnsignedCommandType type
)

Parameters

type
Flag that indicates how the shift will be done.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Core

Public Sub ConvertSignedToUnsignedConstructorExample()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

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

   ' Prepare the command
   Dim command As ConvertSignedToUnsignedCommand = New ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero)
   'convert image to unsigned.
   command.Run(leadImage)

End Sub

Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Core;

public void ConvertSignedToUnsignedConstructorExample()
{
   // Load an image
   RasterCodecs codecs = new RasterCodecs();
   codecs.ThrowExceptionsOnInvalidImages = true;

   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "IMAGE2.dcm"));

   // Prepare the command
   ConvertSignedToUnsignedCommand command = new ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero);
   // convert image to unsigned.
   command.Run(image);

}

static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
function ConvertSignedToUnsignedConstructorExample()
{
   var codecs = new Leadtools.Codecs.RasterCodecs();
   codecs.throwExceptionsOnInvalidImages = true;

   // Load the image
   var srcFileName = "Assets\\Image2.dcm";
   return Tools.AppInstallFolder().getFileAsync(srcFileName).then(function (loadFile) {
      return codecs.loadAsync(Leadtools.LeadStreamFactory.create(loadFile));
   }).then(function (image) {
      // Prepare the command
      with (Leadtools.ImageProcessing.Core) {
         var command = new ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.shiftNegativeToZero);
         // convert image to unsigned.
         command.run(image);
      }
   });
}
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Core;

      
public async Task ConvertSignedToUnsignedConstructorExample()
{
   // Load an image
   RasterCodecs codecs = new RasterCodecs();
   codecs.ThrowExceptionsOnInvalidImages = true;
   // Load the image
   string srcFileName = @"Assets\Image2.dcm";
   StorageFile loadFile = await Tools.AppInstallFolder.GetFileAsync(srcFileName);
   RasterImage image = await codecs.LoadAsync(LeadStreamFactory.Create(loadFile));

   // Prepare the command
   ConvertSignedToUnsignedCommand command = new ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero);
   // convert image to unsigned.
   command.Run(image);

}
using Leadtools;
using Leadtools.Examples;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Core;

public void ConvertSignedToUnsignedConstructorExample(RasterImage image)
{
   // Prepare the command
   ConvertSignedToUnsignedCommand command = new ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero);
   // convert image to unsigned.
   command.Run(image);
   image.Dispose();
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Core

Public Sub ConvertSignedToUnsignedConstructorExample(ByVal image As RasterImage)
   ' Prepare the command
   Dim command As ConvertSignedToUnsignedCommand = New ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero)
   ' convert image to unsigned.
   command.Run(image)
   image.Dispose()
End Sub
Requirements

Target Platforms

See Also

Reference

ConvertSignedToUnsignedCommand Class
ConvertSignedToUnsignedCommand Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.