# FFT from ITK Simple Filters (vs rest of Slicer)

**URL:** <https://discourse.slicer.org/t/fft-from-itk-simple-filters-vs-rest-of-slicer/33206>\
**Category:** Support\
**Created:** [December 4, 2023, 4:26pm UTC](https://discourse.slicer.org/t/fft-from-itk-simple-filters-vs-rest-of-slicer/33206 "2023-12-04T16:26:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shai-ikko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shai-ikko/32/15765_2.png) [@shai-ikko](https://discourse.slicer.org/u/shai-ikko)\
**Post date:** [December 4, 2023, 4:26pm UTC](https://discourse.slicer.org/t/fft-from-itk-simple-filters-vs-rest-of-slicer/33206/1 "2023-12-04T16:26:00Z")

</div>

Hi,

I am trying to do some image processing with Slicer, and one of the things I wanted to try was a High Pass filter. I found no such filter ready-made, so I thought I might construct one using parts which are. The first step is FFT, and in “ITK Simple Filters” there is a “ForwardFFTImageFilter”, which looks like it can fit the bill.

Alas, FFT produces an image whose pixels are complex; and AFAICT, Slicer doesn’t really support this. So, I got a volume with these properties:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/1/41a9aa36509267ed52ad4f09d40fb103cd1fce53.png)

It’s a Scalar volume, so one can’t apply Vector-to-Scalar to extract the real and imaginary parts; and yet its scalar type is “2 doubles”, which nothing in Slicer seems to handle – including ITK Simple filters. E.g. when trying to extract the magnitude using ComplexToModulusImageFilter, we get:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/5/558e513c5241926ae5949bc502b870f62c741a21.png)

I will manage to do what I want in Python, I suppose, but, unless I’m missing something, this appears to be broken.

Slicer 5.4.0 on Linux, in case that matters.

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [December 4, 2023, 5:24pm UTC](https://discourse.slicer.org/t/fft-from-itk-simple-filters-vs-rest-of-slicer/33206/2 "2023-12-04T17:24:06Z")

</div>

This might be not helpful: But I was able to do a frequency domain filtering using SimpleFilters on Slicer in the past. I don’t have any code though.
