[Insight-users] I have a problem With FFT in ITK
Luis Ibanez
luis.ibanez at kitware.com
Sat Jul 22 12:09:54 EDT 2006
Hi Vahid,
You will find information about FFTW at
http://www.fftw.org/
For installation instructions, please read
http://www.fftw.org/download.html
If you are using Linux, you can simply install
FFTW as a package.
Regards,
Luis
----------------------
vahid taimouri wrote:
> Hi Luis
>
> Thanks for your regards, but I would like to know how can FTTW be
> installed? Whether does FFTW need other files to be downloaded?
> Please state more explanation about all things that must be done to run
> FFTW.
>
>
> Thanks
>
>
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
>
>
> Hi Vahid,
>
>
> Yes, this is a known problem with the VNL implementation of FFT.
>
>
> You may want to install FFTW in your system and rerun CMake in
> ITK in order to specify that you want to use FFTW. This is
> currently an advanced option in the CMake configuration of ITK.
>
>
> Regards,
>
>
> Luis
>
>
>
> ---------------------------
> vahid taimouri wrote:
> > Hi all
> > I tried to use FFT to build an ideal lowpass filter
> > But I think FFT doesn't work correctly,
> > Also I applied the FFT to an image and then the inverse FFT to
> its result
> > But surprisingly it didn't retrieve my image!!!
> >
> > I added my codes here, please guild to solve this problem
> > Thanks
> >
> > void main()
> > {
> > char InputImageName[30] = "Inputimage.bmp";
> > char OutputImageName[30] = "OutputImage.bmp";
> >
> > typedef itk::Image< unsigned char, 2 > InputImageType;
> > typedef itk::Image< unsigned char, 2 > OutputImageType;
> >
> > typedef itk::Image< float, 2 > InputFilterType;
> > typedef itk::Image< float, 2 > OutputFilterType;
> >
> > typedef itk::ImageFileReader< InputImageType > ReaderType;
> > typedef itk::RescaleIntensityImageFilter
> > InputFilterType > RescaleFilterType;
> > typedef itk::VnlFFTRealToComplexConjugateImageFilter< float, 2 >
> > FFTFilterType;
> > typedef itk::VnlFFTComplexConjugateToRealImageFilter< float, 2 >
> > IFFTFilterType;
> > typedef itk::RescaleIntensityImageFilter
> > OutputImageType > RescaleFilterType;
> > typedef itk::ImageFileWriter< OutputImageType > WriterType;
> > ReaderType::Pointer reader = ReaderType::New();
> > InputRescaleFilterType::Pointer inputintensityrescaler =
> > InputRescaleFilterType::New();
> > FFTFilterType::Pointer fftFilter = FFTFilterType::New();
> > IFFTFilterType::Pointer fftInverseFilter = IFFTFilterType::New();
> > OutputRescaleFilterType::Pointer outputintensityrescaler =
> > OutputRescaleFilterType::New();
> > WriterType::Pointer writer = WriterType::New();
> >
> > Inputintensityrescaler->SetOutputMinimum( 0 );
> > Inputintensityrescaler->SetOutputMaximum( 255 );
> >
> > Outputintensityrescaler->SetOutputMinimum( 0 );
> > Outputintensityrescaler->SetOutputMaximum( 255 );
> >
> > reader->SetFileName( InputImageName );
> > writer->SetFileName( OutputImageName );
> > reader->Update();
> >
> > inputintensityrescaler->SetInput( reader->GetOutput() );
> > fftFilter->SetInput( inputintensityrescaler->GetOutput() );
> > fftFilter->Update();
> >
> > fftInverseFilter->SetInput( fftFilter->GetOutput() );
> >
> > typedef itk::FlipImageFilter< InputFilterType > FlipperType;
> > FlipperType::Pointer flipper = FlipperType::New();
> > bool fliparray[2] = {true,true};
> > FlipperType::FlipAxesArrayType flipAxes( fliparray );
> > flipper->SetFlipAxes(flipAxes);
> > flipper->SetInput(fftInverseFilter->GetOutput());
> >
> >
> > Outputintensityrescaler->SetInput( flipper->GetOutput() );
> >
> > writer->SetInput(Outputintensityrescaler->GetOutput());
> > writer->Update();
> > }
> >
> >
> ------------------------------------------------------------------------
> > Do you Yahoo!?
> > Everyone is raving about the all-new Yahoo! Mail Beta.
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
>
> ------------------------------------------------------------------------
> See the all-new, redesigned Yahoo.com. Check it out.
> <http://us.rd.yahoo.com/evt=40762/*http://www.yahoo.com/preview>
More information about the Insight-users
mailing list