Leadtools.ImageProcessing.Core Namespace > DiscreteFourierTransformCommand Class > DiscreteFourierTransformCommand Constructor : DiscreteFourierTransformCommand Constructor(FourierTransformInformation,LeadRect,DiscreteFourierTransformCommandFlags) |
public DiscreteFourierTransformCommand( FourierTransformInformation fourierTransformInformation, LeadRect range, DiscreteFourierTransformCommandFlags flags )
'Declaration Public Function New( _ ByVal fourierTransformInformation As FourierTransformInformation, _ ByVal range As LeadRect, _ ByVal flags As DiscreteFourierTransformCommandFlags _ )
'Usage Dim fourierTransformInformation As FourierTransformInformation Dim range As LeadRect Dim flags As DiscreteFourierTransformCommandFlags Dim instance As New DiscreteFourierTransformCommand(fourierTransformInformation, range, flags)
public DiscreteFourierTransformCommand( FourierTransformInformation fourierTransformInformation, LeadRect range, DiscreteFourierTransformCommandFlags flags )
function DiscreteFourierTransformCommand( fourierTransformInformation , range , flags )
public: DiscreteFourierTransformCommand( FourierTransformInformation^ fourierTransformInformation, LeadRect range, DiscreteFourierTransformCommandFlags flags )
Public Sub DiscreteFourierTransformConstructorExample() 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 FTArray As FourierTransformInformation FTArray = New FourierTransformInformation(leadImage) Dim rcRange As LeadRect rcRange = New LeadRect(0, 0, CType((leadImage.Width / 4), Integer), CType((leadImage.Height / 2), Integer)) Dim command As DiscreteFourierTransformCommand command = New DiscreteFourierTransformCommand(FTArray, rcRange, DiscreteFourierTransformCommandFlags.DiscreteFourierTransform Or DiscreteFourierTransformCommandFlags.Gray Or DiscreteFourierTransformCommandFlags.Range Or DiscreteFourierTransformCommandFlags.InsideX Or DiscreteFourierTransformCommandFlags.OutsideY) ' Apply DFT. command.Run(leadImage) End Sub Public NotInheritable Class LEAD_VARS Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images" End Class
public void DiscreteFourierTransformConstructorExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")); // Prepare the command FourierTransformInformation FTArray = new FourierTransformInformation(image); LeadRect rcRange = new LeadRect(0, 0, image.Width / 4, image.Height / 2); DiscreteFourierTransformCommand command = new DiscreteFourierTransformCommand(FTArray, rcRange , DiscreteFourierTransformCommandFlags.DiscreteFourierTransform | DiscreteFourierTransformCommandFlags.Gray | DiscreteFourierTransformCommandFlags.Range | DiscreteFourierTransformCommandFlags.InsideX | DiscreteFourierTransformCommandFlags.OutsideY); // Apply DFT. command.Run(image); } static class LEAD_VARS { public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images"; }
function DiscreteFourierTransformConstructorExample() { 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) { var FTArray = new FourierTransformInformation(image); var rcRange = Leadtools.LeadRectHelper.create(0, 0, image.width / 4, image.height / 2); var command = new DiscreteFourierTransformCommand(FTArray, rcRange , DiscreteFourierTransformCommandFlags.discreteFourierTransform | DiscreteFourierTransformCommandFlags.gray | DiscreteFourierTransformCommandFlags.range | DiscreteFourierTransformCommandFlags.insideX | DiscreteFourierTransformCommandFlags.outsideY); // Apply DFT. command.run(image); } }); }
[TestMethod] public async Task DiscreteFourierTransformConstructorExample() { // 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 FourierTransformInformation FTArray = new FourierTransformInformation(image); LeadRect rcRange = LeadRectHelper.Create(0, 0, image.Width / 4, image.Height / 2); DiscreteFourierTransformCommand command = new DiscreteFourierTransformCommand(FTArray, rcRange , DiscreteFourierTransformCommandFlags.DiscreteFourierTransform | DiscreteFourierTransformCommandFlags.Gray | DiscreteFourierTransformCommandFlags.Range | DiscreteFourierTransformCommandFlags.InsideX | DiscreteFourierTransformCommandFlags.OutsideY); // Apply DFT. command.Run(image); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2