Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.6.27
|
Leadtools.ImageProcessing.Core Namespace > Complex Structure : Complex Constructor |
LTComplex LTComplexCreate(double r, double i)
public Complex(double r, double i)
Define a complex number.
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.ImageProcessing.Core Public Sub ComplexConstructorExample_S2() Dim codecs As New RasterCodecs() codecs.ThrowExceptionsOnInvalidImages = True Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\\FourierTransform.jpg")) ' Prepare the command Dim com As Complex = New Complex(12.0, 5.0) ' Get the real and the imaginary part of the complex number. MessageBox.Show("Complex number real part is : " & com.R) MessageBox.Show("Complex number Imaginary part is : " & com.I) 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 ComplexConstructorExample_S2() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")); // Prepare the command // Set the real and the imaginary part of the complex number. Complex com = Complex.Empty; com.R = 12.0; com.I = 5.0; Complex com2 = new Complex(com.R, com.I); // Get the real and the imaginary part of the complex number. MessageBox.Show("Complex number real part is : " + com2.R); MessageBox.Show("Complex number Imaginary part is : " + com2.I); } static class LEAD_VARS { public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images"; }
function ComplexConstructorExample_S2() { var codecs = new Leadtools.Codecs.RasterCodecs(); codecs.throwExceptionsOnInvalidImages = true; // Load the image var srcFileName = "Assets\\Image1.cmp"; 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) { // Set the real and the imaginary part of the complex number. var com = ComplexHelper.empty; com.r = 12.0; com.i = 5.0; var com2 = ComplexHelper.create(com.r, com.i); // Get the real and the imaginary part of the complex number. console.error("Complex number real part is : " + com2.r); console.error("Complex number Imaginary part is : " + com2.i); } }); }
using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Core; public async Task ComplexConstructorExample_S2() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; // Load the image string srcFileName = @"Assets\Image1.cmp"; StorageFile loadFile = await Tools.AppInstallFolder.GetFileAsync(srcFileName); RasterImage image = await codecs.LoadAsync(LeadStreamFactory.Create(loadFile)); // Prepare the command // Set the real and the imaginary part of the complex number. Complex com = ComplexHelper.Empty; com.R = 12.0; com.I = 5.0; Complex com2 = ComplexHelper.Create(com.R, com.I); // Get the real and the imaginary part of the complex number. Debug.WriteLine("Complex number real part is : " + com2.R); Debug.WriteLine("Complex number Imaginary part is : " + com2.I); }