DisplayFourierTransformation example for C++ Builder
/* This example loads a bitmap, applies the Discrete Fourier Transform function to it, and displays the data*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
/*Initialize buffer*/
LEADImage1->InitFourierTransformationData( );
/* apply DFT*/
LEADImage1->DiscreteFourierTransformation( 0, 0, LEADImage1->BitmapWidth / 4, LEADImage1->BitmapHeight / 2, DFT_DFT + DFT_GRAY + DFT_RANGE + DFT_INSIDE_X + DFT_OUTSIDE_Y );
/*plot frequency magnitude*/
LEADImage1->DisplayFourierTransformation( DSP_FT_MAG + DSP_FT_LOG );
/*Frees buffer*/
LEADImage1->FreeFourierTransformationData( );
}