# SetSigma in sitk.SmoothingRecursiveGaussianImageFilter()

**URL:** <https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721>\
**Category:** Algorithms\
**Tags:** simpleitk\
**Created:** [April 1, 2019, 1:55am UTC](https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721 "2019-04-01T01:55:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego\_C](https://discourse.itk.org/user_avatar/discourse.itk.org/diego_c/32/279_2.png) [@Diego\_C](https://discourse.itk.org/u/Diego_C)\
**Post date:** [April 1, 2019, 1:55am UTC](https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721/1 "2019-04-01T01:55:22Z")

</div>

According to the documentation SetSigma is _measured in the units of image spacing_. If I have 3D image with spacing = [0.5, 0.5, 3] (mm) and sigma is set to 3, does this mean that I am smoothing 3mm isotropically? Or does this mean that sigma is 3 x [0.5, 0.5, 3] = [1.5, 1.5, 9] (mm)?

---

<div class="post-metadata">

**Author:** ![Diego\_C](https://discourse.itk.org/user_avatar/discourse.itk.org/diego_c/32/279_2.png) [@Diego\_C](https://discourse.itk.org/u/Diego_C)\
**Post date:** [April 1, 2019, 2:29am UTC](https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721/2 "2019-04-01T02:29:51Z")

</div>

I found this in the source code:

 ![image](https://discourse.itk.org/uploads/default/original/1X/e2753ffdaa2b475608d4d588493518514af54072.png)

Does this mean that the parameter sigma is divided by the spacing of the image to calculate how many pixels on each direction the filter smooths over?

suggestion: the documentation could be clearer about the sigma parameter. If it said that sigma is measured in _real world units_ I think it would be helpful. Thanks.

---

<div class="post-metadata">

**Author:** ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Post date:** [April 1, 2019, 1:34pm UTC](https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721/3 "2019-04-01T13:34:32Z")

</div>

> [@Diego\_C](#):
>
> suggestion: the documentation could be clearer about the sigma parameter. If it said that sigma is measured in _real world units_ I think it would be helpful. Thanks.

Hello,

Thank you for you suggestion and discussion. But technically it is not in “Physical Coordinates” ( common ITK term) because it does not take into consideration the direction cosine matrix. For that reason I think the existing wording is more accurate than your proposed wording. Though the original could be clearer… So further suggestions are quite welcomed!

---

<div class="post-metadata">

**Author:** ![Diego\_C](https://discourse.itk.org/user_avatar/discourse.itk.org/diego_c/32/279_2.png) [@Diego\_C](https://discourse.itk.org/u/Diego_C)\
**Post date:** [April 1, 2019, 6:26pm UTC](https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721/4 "2019-04-01T18:26:36Z")

</div>

Thanks for the reply Bradley,

I just checked the ITK doxygen and it says now “world coordinates”. 👍 thanks for that.

As a user of the library I needed to know If sigma was in index space (voxels) or world space (mm in my case)

Thanks,

Diego
