L_LTIMGCOR_API L_INT L_FrqFilterBitmap(pFTArray, prcRange, uFlags)
Filters the frequency harmonics data produced by a Fourier Transform function using a range rectangle.
Pointer to an FTARRAY structure. The acxData member of the FTARRAY structure is a two-dimensional array holding the frequency components.
Specifies the filter dimension that will be applied, it represents the frequency range to be kept or removed. The left value refers to the minimum X harmonic, the right refers to the maximum X harmonic, the top refers to the minimum Y harmonic and the bottom refers to the maximum Y harmonic. The maximum X harmonic equals Width 1 and the maximum Y harmonic equals Height 1.
Flags that indicate the operation to be performed on the specified X and Y harmonics ranges. You can use a bit wise OR (|) to specify one flag from each group.
|FRQ_INSIDE_X||[0x0001] Keep the X harmonics inside X range and remove outside ones.|
|FRQ_OUTSIDE_X||[0x0002] Remove the X harmonics inside X range and keep outside ones.|
|FRQ_INSIDE_Y||[0x0010] Keep the Y harmonics inside Y range and remove outside ones.|
|FRQ_OUTSIDE_Y||[0x0020] Remove the Y harmonics inside Y range and keep outside ones.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
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 is used only when working with Fourier Transform functions.
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.
Before using this function, call the L_AllocFTArray function to allocate a FTARRAY structure large enough to hold the Fourier Transform coefficients for pBitmap. When the array is no longer needed, free the allocated array by calling the L_FreeFTArray function.
To update a status bar or detect a user interrupt during execution of this function, refer to L_SetStatusCallback.
Required DLLs and Libraries
Win32, x64, Linux.
this example filters the acxData of a pFTARRAY structure produced by the Fast Fourier Transform function
nRet = L_LoadBitmap (MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\FourierTransform.jpg")), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL);
rcRange.left = 0;
rcRange.right = LeadBitmap.Width / 4;
rcRange.top = 0;
rcRange.bottom = LeadBitmap.Height / 2;
/*Allocate FT buffer*/
nRet = L_AllocFTArray(&LeadBitmap, &pFTArray, sizeof(FTARRAY), 0);
/*lpFTData is known*/
/* filters the frequencies*/
nRet = L_FrqFilterBitmap(pFTArray, &rcRange, FRQ_INSIDE_X | FRQ_INSIDE_Y);
nRet = L_SaveBitmap(MAKE_IMAGE_PATH(TEXT("Result.BMP")), &LeadBitmap, FILE_BMP, 24, 0, NULL);
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries