This function is used to display the results of a Fast Fourier Transform or a Discrete Fourier analysis as a bitmap.
#include "ltwrappr.h"
virtual L_INT LBitmap::FTDisplay (pFTArray, uFlags)
Pointer to a FTARRAY structure. The acxData member of the FTARRAY structure is a two-dimensional array holding the frequency components. Its dimensions must equal the bitmap dimensions.
Flags that indicate the data to be shown and the plotting scale. You can use a bit-wise OR ( | ) to specify one flag from each group.
Value | Meaning |
---|---|
DSP_FT_MAG | [0x0001] Plot harmonics magnitude data. |
DSP_FT_PHS | [0x0002] Plot harmonics phase data. |
Value | Meaning |
---|---|
DSP_FT_NORM | [0x0010] Plot harmonics magnitudes using the normal linear scale. |
DSP_FT_LOG | [0x0020] Plot harmonics magnitudes using logarithmic scale. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function converts the acxData member of the FTARRAY structure computed by LBitmap::FFT or LBitmap::DFT functions into a bitmap. The resulting bitmap may be displayed such that it shows either the frequency harmonics amplitude data or phase data. The (0,0) frequency located in bitmap center, positive X harmonics in the right half and positive Y harmonics located in the lower half of the bitmap.
This function does not work on regions. If a bitmap has a region the function ignores it and processes the entire bitmap.
Bitmap should be allocated prior to calling this function. The size of the bitmap must be the same size as the bitmap that was used to generate acxData or it must have the same width and height of the FTARRAY structure if the transform data was allocated with a padding flag for use with the LBitmap::FFT function.
To update a status bar or detect a user interrupt during execution of this function, refer to LBase::EnableStatusCallback.
This function does not support 12 and 16-bit grayscale and 48 and 64-bit color images. If the image is 12 and 16-bit grayscale and 48 and 64-bit color, the function will not return an error.
This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
Win32, x64.
L_INT LBitmap__FTDisplayExample(LBitmap *pLeadBitmap, LBitmap *pDisplayBitmap)
{
/* This example applies the Discrete Fourier Transform function to it, and displays the data*/
RECT rcRange;
pFTARRAY pFTArray;
pDisplayBitmap->Copy(*pLeadBitmap);
/*Allocates buffer*/
pLeadBitmap->AllocFTArray (&pFTArray, sizeof(FTARRAY));
rcRange.left = 0;
rcRange.right = pLeadBitmap->GetWidth () / 4;
rcRange.top = 0;
rcRange.bottom = pLeadBitmap->GetHeight () / 2;
/* apply DFT*/
pLeadBitmap->DFT (pFTArray, &rcRange, DFT_DFT | DFT_GRAY | DFT_RANGE| DFT_INSIDE_X| DFT_OUTSIDE_Y);
/*plot frequency magnitude*/
pDisplayBitmap->FTDisplay(pFTArray, DSP_FT_MAG | DSP_FT_LOG);
LBitmap::FreeFTArray (pFTArray);
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document