# Can't find STAPLE filter in SimpleFilters

**URL:** <https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045>\
**Category:** Support\
**Created:** [September 13, 2017, 8:29pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045 "2017-09-13T20:29:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katrina\_Woodford](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Katrina\_Woodford](https://discourse.slicer.org/u/Katrina_Woodford)\
**Post date:** [September 13, 2017, 8:29pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/1 "2017-09-13T20:29:25Z")

</div>

Hi all,

The 3DSlicer wiki page for the Simple Filters Module lists a STAPLE Image Filter as one of the filter options. However I can’t seem to find it when using the software.

Can anyone help me locate it?

Thanks,  
Katrina

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 13, 2017, 9:08pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/2 "2017-09-13T21:08:33Z")

</div>

It seems that [it has been removed](https://github.com/SimpleITK/SlicerSimpleFilters/commit/77eeae334bef866318ed923e786d4af508b994ac). Maybe @blowekamp knows more details.

---

<div class="post-metadata">

**Author:** ![blowekamp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/blowekamp/32/1386_2.png) [@blowekamp](https://discourse.slicer.org/u/blowekamp)\
**Post date:** [September 14, 2017, 1:39pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/3 "2017-09-14T13:39:00Z")

</div>

Yes, Andras Lasso is correct it was removed. Here is the archived mailing thread about the discussion:  
[http://massmail.spl.harvard.edu/public-archives/slicer-devel/2016/041191.html](http://massmail.spl.harvard.edu/public-archives/slicer-devel/2016/041191.html)

Could you please create an issue on the repository to fix this filter:

> **[SimpleITK/SlicerSimpleFilters](https://github.com/SimpleITK/SlicerSimpleFilters/issues)**
>
> A Module for Slicer3D to provide a simple GUI to image filters from the Insight Toolkit. - SimpleITK/SlicerSimpleFilters

The documentation should also be updated. And this modules is in need of a bit of TLC.

---

<div class="post-metadata">

**Author:** ![Katrina\_Woodford](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Katrina\_Woodford](https://discourse.slicer.org/u/Katrina_Woodford)\
**Post date:** [September 16, 2017, 4:20am UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/4 "2017-09-16T04:20:12Z")

</div>

Thanks Andras and Brad.

I’ve submitted the issue on github as suggested.

Kind regards,  
Katrina

---

<div class="post-metadata">

**Author:** ![Prashant\_Pandey](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Prashant\_Pandey](https://discourse.slicer.org/u/Prashant_Pandey)\
**Post date:** [June 1, 2020, 6:33pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/5 "2020-06-01T18:33:47Z")

</div>

Are there any updates to this? I can see the STAPLE algorithm is still missing despite the github issue, and the mailing list link is down for me.

---

<div class="post-metadata">

**Author:** ![Prashant\_Pandey](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Prashant\_Pandey](https://discourse.slicer.org/u/Prashant_Pandey)\
**Post date:** [June 2, 2020, 6:10pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/6 "2020-06-02T18:10:39Z")

</div>

@lassoan @blowekamp @jcfr  
I think I fixed one of the issues with the STAPLE filter by reading this discussion [http://slicer-devel-archive.65872.n3.nabble.com/STAPLE-Filter-SimpleFilters-missing-V4-6-td4037712.html](http://slicer-devel-archive.65872.n3.nabble.com/STAPLE-Filter-SimpleFilters-missing-V4-6-td4037712.html)

However I am not sure how to validate if it is working? The algorithm accepts only one volume as input, and from my understanding it should accept multiple binary label maps and output a probability map. However the output is the same as the input. Any ideas?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 2, 2020, 8:05pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/7 "2020-06-02T20:05:30Z")

</div>

How did you fix the issue? Which file have you modified?

---

<div class="post-metadata">

**Author:** ![Prashant\_Pandey](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Prashant\_Pandey](https://discourse.slicer.org/u/Prashant_Pandey)\
**Post date:** [June 2, 2020, 8:27pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/8 "2020-06-02T20:27:16Z")

</div>

For Slicer 4.10.2 in SimpleFilters.py, just above line 956 I inserted:  
default = int( max( w.minimum, min(w.maximum, 50)))

And then reinserted the STAPLEImageFilter.json file that was deleted in an earlier commit.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 2, 2020, 8:59pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/9 "2020-06-02T20:59:27Z")

</div>

If you only need to modify Python files then it is easy to test your modifications, as they take effect when you restart Slicer.

---

<div class="post-metadata">

**Author:** ![Prashant\_Pandey](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Prashant\_Pandey](https://discourse.slicer.org/u/Prashant_Pandey)\
**Post date:** [June 3, 2020, 2:33pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/10 "2020-06-03T14:33:54Z")

</div>

That’s not what I meant. I’ve already restarted Slicer and can see the STAPLE is available in Simple Filters.

However when I use it I can’t tell if it’s doing the correct processing. I expect it to produce a probability map as an output but instead it just spits out the input image as the output. If anyone has any experience using STAPLE in ITK I would appreciate their help!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 3, 2020, 4:23pm UTC](https://discourse.slicer.org/t/cant-find-staple-filter-in-simplefilters/1045/11 "2020-06-03T16:23:34Z")

</div>

Probably this question can be answered better on the [ITK forum](https://discourse.itk.org/). If you post your question there, post the link here so that we can follow the discussion.
