FrequencyFilter example for C++ 5.0 and later
int MaxXHarmonic,MaxYHarmonic;
ILEADRasterProcess* m_pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc);
ILEADRaster* m_pDisplayRaster= NULL;
CoCreateInstance(CLSID_LEADRaster, NULL, CLSCTX_ALL, IID_ILEADRaster, (void**)&m_pDisplayRaster);
m_pDisplayRaster->PutBitmap(m_LeadRasterView.GetRaster().GetBitmap());
MaxXHarmonic = m_LeadRasterView.GetRaster().GetBitmapWidth() / 4;
MaxYHarmonic = m_LeadRasterView.GetRaster().GetBitmapHeight() / 2;
m_pRasterProc->InitFourierTransformation (m_LeadRasterView.GetRaster());
m_pRasterProc->DiscreteFourierTransformation(m_LeadRasterView.GetRaster(),
0,
MaxXHarmonic,
0,
MaxYHarmonic,
DFT_DFT |
DFT_GRAY |
DFT_RANGE |
DFT_INSIDE_X |
DFT_OUTSIDE_Y);
m_pRasterProc->FrequencyFilter(0, MaxXHarmonic, 0, MaxYHarmonic, FRQ_INSIDE_X | FRQ_INSIDE_Y);
m_pRasterProc->DisplayFourierTransformation(m_pDisplayRaster, DSP_FT_MAG | DSP_FT_LOG);
m_LeadRasterView.GetRaster().SetBitmap( m_pDisplayRaster->GetBitmap());
m_pRasterProc->FreeFourierTransformation();
m_pRasterProc->Release();