[Insight-users] FFT

Luis Ibanez luis.ibanez at kitware.com
Sun Apr 6 19:21:24 EDT 2008


Hi Alex,

Thanks for your additional comments.


About your question:

    Yes, it is possible to perform a convolution
    of two images by multiplying their Fourier
    transforms, and taking the inverse Fourier
    transform of the output.


    The example:

     FFTImageFilterFourierDomainFiltering.cxx

    illustrates an operation close to what you
    need.



Here is what I would suggest you to do:


1) Convert your two DICOM images to MetaImages
    by using the example

      Insight/Examples/IO/
      DicomSeriesReadImageWrite2.cxx

    load the into ParaView (www.paraview.org)
    or Slicer
    http://www.na-mic.org/Slicer/Download/Snapshots/

    and double check that they look like the
    original DICOM files.


2) Then modify the example:

    FFTImageFilterFourierDomainFiltering.cxx

    to use Dimension = 3,
    instead of the current 2.

    Then modify the pipeline for doing
    the following:


     have to readers,
     connect a FFT filter to each one
     then multiply their outputs with
     the MultiplyImageFilter, and finally
     connect its output to an inverse
     FFT filter.

     Save the output of the Inverser
     FFT filer as a metaimage and then
     load it into Slicer or Paraview.



   Regards,


      Luis


-------------------------------
alexandre govignon wrote:
> Hi Alexandre,
> 
> 
>    It is *impossible* to try it all  :-)
> 
> 
> You may have tried many combinations,...
> 
> and
> certainly enough of them for generating frustration.
> 
> 
>    So... let's start from the beginning
> 
> 
> Take a deep breath and give us real technical
> information that we could use.
> 
> Thank you, you're right
> 
> 1) You seem to have tried with the Circle.png file.
>   Did you used the command that I suggested in my
>   previous email ?:
> 
>    FFTImageFilter.exe
>      Insight/Examples/Data/Circle.png
>      circleReal.mhd
>      circleImg.mhd
> 
> Yes and your images show me that it seems good
> 
> 2) If it didn't work, then please tell us
>   How do you arrive to the conclusion that
>   it is not working.
> 
> 
>   a) Did it crashed ?
>   b) Did it throw an exception ?
>   c) Did it produced an empty image ?
> 
>   From your description it seems that it
>   is running and producing a:
> 
>         "The same results:
>          one level of grey scale"
> 
>    which lead us to think that what you
>    may have is a visualization issue.
> 
>    The FFT of a medical image will be typically
>    an image full of zeros, with a few non-zero
>    values concentrated in the corners.
> 
>    What are you using for visualizing the
>    output images ?
> 
> I use paraview, and actually, i didn't that a FFT of a medical image
> have this form.
> 
>    What file format are you using for storing
>    the output image ?
> 
> mhd, and before dcm tiff and png. Can i have an answer for this question:
> 
> I would like to know if you think, that it is possible witk ITK to
> make the convolution of 2 Dicom images, in the frequency domain thanks
> to the FFTFImage Filter?
> 
>    As an example of the correct output,
>    I'm attaching to this email the files
> 
>           circleReal.png
>           circleImg.png
> 
>    Please take a look at them and let us
>    know if they look like the ones you get.
> 
> 
> 3) For the record:
> 
>    Yes, you can convert your DICOM images
>    to PNG. but that's not the right solution
>    for your problem in this case. The input
>    file format, should be irrelevant here,
>    *as long* as you are declaring your image
>    to be of the correct pixel type.
> 
> I m not sure to understand ? do you think that i can obtain better
> image with the FFTImageFilter?
> And how?
>    Tell us more about your DICOM image:
> 
>     - What is the image modality ?
>     - What is the Dimension ? (2D or 3D)
>     - How many pixels on each dimension ?c
> 
> 3D, from PET or SPECT
> 
> 512 on each dimension
> 
> 
> 
> Thank you very much, and i m awfully to have been so desperate.
> 
> I had a presentation monday, and i will be very happy if you can
> answer me tomorrow to the late
> 
> Regards,
> Alexandre
> 


More information about the Insight-users mailing list