# Wiener deconvolution image filter

**URL:** https://discourse.itk.org/t/wiener-deconvolution-image-filter/3498
**Category:** Beginner Questions
**Created:** [October 1, 2020, 8:13am UTC](https://discourse.itk.org/t/wiener-deconvolution-image-filter/3498 "2020-10-01T08:13:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Romy\_Meester](https://discourse.itk.org/user_avatar/discourse.itk.org/romy_meester/32/1736_2.png) [@Romy\_Meester](https://discourse.itk.org/u/Romy_Meester)
#### Post date: [October 1, 2020, 8:13am UTC](https://discourse.itk.org/t/wiener-deconvolution-image-filter/3498/1 "2020-10-01T08:13:44Z")

</div>

Hello,

I try to implement several filters in SITK for 3D images, but I do get an error with the Wiener deconvolution image filter. (The Gaussian, median and curvature flow are working 🙂 )  
This is my function:

```
def calc_wiener(img, cond=2, var=0.2):
""" Wiener Deconvolution image filter. """
blurFilter = sitk.WienerDeconvolutionImageFilter()
blurFilter.SetBoundaryCondition(cond)
blurFilter.SetNoiseVariance(var)
imgSmooth = blurFilter.Execute(img)
return imgSmooth

```

And I do get this error:

```
NotImplementedError: Wrong number or type of arguments for overloaded function 'WienerDeconvolutionImageFilter_Execute'.

```

Possible C/C++ prototypes are:  
itk::simple::WienerDeconvolutionImageFilter::Execute(itk::simple::Image const &,itk::simple::Image const &)  
itk::simple::WienerDeconvolutionImageFilter::Execute(itk::simple::Image const &,itk::simple::Image const &,double,bool,itk::simple::WienerDeconvolutionImageFilter::BoundaryConditionType,itk::simple::WienerDeconvolutionImageFilter::OutputRegionModeType)

Does anyone know how to solve this error?

---

<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: [October 1, 2020, 1:34pm UTC](https://discourse.itk.org/t/wiener-deconvolution-image-filter/3498/2 "2020-10-01T13:34:41Z")

</div>

Hello @Romy_Meester,

You are missing the blurring kernel parameter in the `Execute` method. [The documentation](https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1WienerDeconvolutionImageFilter.html#details) says that it expects “the image to be deconvolved and the blurring kernel”. This parameter is required in all versions of SimpleITK.

Also, based on the error message you are using an older toolkit version. We recommend upgrading to the latest version, 2.0, which was [recently released](https://github.com/SimpleITK/SimpleITK/releases).
