# How to change the values in the sitk.ForwardFFTImageFilter

**URL:** <https://discourse.itk.org/t/how-to-change-the-values-in-the-sitk-forwardfftimagefilter/6379>\
**Category:** Beginner Questions\
**Tags:** simpleitk\
**Created:** [January 3, 2024, 1:42am UTC](https://discourse.itk.org/t/how-to-change-the-values-in-the-sitk-forwardfftimagefilter/6379 "2024-01-03T01:42:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfunkalea](https://discourse.itk.org/letter_avatar_proxy/v4/letter/g/ee59a6/32.png) [@gfunkalea](https://discourse.itk.org/u/gfunkalea)\
**Post date:** [January 3, 2024, 1:42am UTC](https://discourse.itk.org/t/how-to-change-the-values-in-the-sitk-forwardfftimagefilter/6379/1 "2024-01-03T01:42:22Z")

</div>

I want to take the discreet FFT of an image and then zero out the high spatial frequency values and then use the inverse FFT to see the result. My problem is that I get an error trying to use SetPixel on the Fourier transform image. How am I supposed to access and change the values in the result of executing the Simple ITK ForwardFFTImageFilter?

---

<div class="post-metadata">

**Author:** ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)\
**Post date:** [January 3, 2024, 2:43pm UTC](https://discourse.itk.org/t/how-to-change-the-values-in-the-sitk-forwardfftimagefilter/6379/2 "2024-01-03T14:43:30Z")

</div>

Hello @gfunkalea,

To set the pixel value use the bracket operator or the `SetPixel` method as shown below (assuming you are working in Python which has support for the bracket operator, otherwise, just the `SetPixel` method):

```auto
import SimpleITK as sitk

file_name = 
image = sitk.ReadImage(file_name, sitk.sitkFloat32)
res = sitk.ForwardFFT(image)

print(res[0,0])
res[0,0] = 0
print(res[0,0])

# or using SetPixel
print(res[0,1])
res.SetPixel([0,1], 0)
print(res[0,0])

```
