DiscreteFourierTransformation 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);

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->FreeFourierTransformation();

m_pRasterProc->Release();