<div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Hi all<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">I tried to use FFT to build an ideal lowpass filter<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">But I think FFT doesn't work correctly,<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black;
FONT-FAMILY: Arial">Also I applied the FFT to an image and then the inverse FFT to its result<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">But surprisingly it didn't retrieve my image!!!<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">I added my codes here, please guild to solve this problem<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt;
unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Thanks<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> void main()<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">{ <BR> char InputImageName[30] = "Inputimage.bmp";<BR> char OutputImageName[30] = "OutputImage.bmp";<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION:
ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> typedef itk::Image< unsigned char, 2 > InputImageType;<BR> typedef itk::Image< unsigned char, 2 > OutputImageType;<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> typedef itk::Image< float, 2 >
InputFilterType;<BR> typedef itk::Image< float, 2 > OutputFilterType;<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> typedef itk::ImageFileReader< InputImageType > ReaderType;<BR> typedef itk::RescaleIntensityImageFilter<InputImageType, InputFilterType > RescaleFilterType;<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> typedef itk::VnlFFTRealToComplexConjugateImageFilter< float, 2 >
FFTFilterType;<BR> typedef itk::VnlFFTComplexConjugateToRealImageFilter< float, 2 > IFFTFilterType;<BR> typedef itk::RescaleIntensityImageFilter<InputFilterType, OutputImageType > RescaleFilterType;<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> typedef itk::ImageFileWriter< OutputImageType > WriterType;<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> ReaderType::Pointer reader = ReaderType::New();<BR> InputRescaleFilterType::Pointer inputintensityrescaler = InputRescaleFilterType::New();<BR> FFTFilterType::Pointer fftFilter = FFTFilterType::New(); <BR> IFFTFilterType::Pointer
fftInverseFilter = IFFTFilterType::New();<BR> OutputRescaleFilterType::Pointer outputintensityrescaler = OutputRescaleFilterType::New();<BR> WriterType::Pointer writer = WriterType::New();<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> Inputintensityrescaler->SetOutputMinimum( 0 );<BR> Inputintensityrescaler->SetOutputMaximum( 255 );<BR> <BR> Outputintensityrescaler->SetOutputMinimum( 0 );<BR> Outputintensityrescaler->SetOutputMaximum( 255 );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt;
DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> reader->SetFileName( InputImageName );<BR> writer->SetFileName( OutputImageName );<BR> reader->Update();<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> inputintensityrescaler->SetInput(
reader->GetOutput() );<BR> fftFilter->SetInput( inputintensityrescaler->GetOutput() );<BR> fftFilter->Update();<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> fftInverseFilter->SetInput( fftFilter->GetOutput() );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed;
TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> typedef itk::FlipImageFilter< InputFilterType > FlipperType;<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> FlipperType::Pointer flipper = FlipperType::New();<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> bool fliparray[2] = {true,true};<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> FlipperType::FlipAxesArrayType flipAxes( fliparray );<o:p></o:p></SPAN></div> <div
class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> flipper->SetFlipAxes(flipAxes);<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> flipper->SetInput(fftInverseFilter->GetOutput());<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><BR> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> Outputintensityrescaler->SetInput(
flipper->GetOutput() );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; DIRECTION: ltr; LINE-HEIGHT: 14.4pt; unicode-bidi: embed; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><BR> writer->SetInput(Outputintensityrescaler->GetOutput());<BR> writer->Update();<BR>}<o:p></o:p></SPAN></div><p> 
                <hr size=1>Do you Yahoo!?<br> Everyone is raving about the <a href="http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/handraisers"> all-new Yahoo! Mail Beta.</a>