# New implementation of functor filter in OTB !!!!

**URL:** https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/2024
**Category:** Engineering
**Created:** [July 9, 2019, 4:08am UTC](https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/2024 "2019-07-09T04:08:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shinavn](https://discourse.itk.org/user_avatar/discourse.itk.org/shinavn/32/854_2.png) [@shinavn](https://discourse.itk.org/u/shinavn)
#### Post date: [July 9, 2019, 4:08am UTC](https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/2024/1 "2019-07-09T04:08:08Z")

</div>

Hi all,

I am working on a new functor filter implementation in OTB, and feedbacks suggest that this is something that could be interesting for ITK. Basically you can use it very simply with any functor with operator() or lambda that has any number of arguments. It will deduce all the types at compile time (supporting scalar pixels, VariableLengthVector, Neighborhoods …) !!!

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [July 9, 2019, 2:29pm UTC](https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/2024/2 "2019-07-09T14:29:05Z")

</div>

Is it designed to replace Unary, Binary and Ternary functor/generator filters? How does it compare to them, e.g. to [UnaryGenerator](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageFilterBase/include/itkUnaryGeneratorImageFilter.h)?

---

<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: [July 9, 2019, 2:33pm UTC](https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/2024/3 "2019-07-09T14:33:29Z")

</div>

This thread appears related:

> [@New implementation of functor filter in OTB](https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/1382):
>
> Hi all, I am working on a new functor filter implementation in OTB, and feedbacks suggest that this is something that could be interesting for ITK. Basically you can use it very simply with any functor with operator() or lambda that has any number of arguments. It will deduce all the types at compile time (supporting scalar pixels, VariableLengthVector, Neighborhoods …). You can find the details here [https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/merge\_requests/268](https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/merge_requests/268), but here is a bit of tea…

Perhaps this is continuing the effort?

---

<div class="post-metadata">

### Author: ![jamesobutler](https://discourse.itk.org/user_avatar/discourse.itk.org/jamesobutler/32/1807_2.png) [@jamesobutler](https://discourse.itk.org/u/jamesobutler)
#### Post date: [July 9, 2019, 4:36pm UTC](https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/2024/4 "2019-07-09T16:36:36Z")

</div>

This is just an example of a bot that copies other people’s posts to earn higher discourse privileges. Something we’ve seen on the Slicer forum as well.

The account did the similar thing [Searching mailing list archives !!!](https://discourse.itk.org/t/searching-mailing-list-archives/2021) as a copy of [Searching mailing list archives](https://discourse.itk.org/t/searching-mailing-list-archives/138).

Admins will want to clean this up probably.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [July 9, 2019, 5:21pm UTC](https://discourse.itk.org/t/new-implementation-of-functor-filter-in-otb/2024/5 "2019-07-09T17:21:54Z")

</div>

Thanks James! I deactivated, suspended and silenced the user. I didn’t want to delete, in order to keep the reference.
