# FilterWatcher

**URL:** <https://discourse.itk.org/t/filterwatcher/882>\
**Category:** Engineering\
**Created:** [May 1, 2018, 3:00pm UTC](https://discourse.itk.org/t/filterwatcher/882 "2018-05-01T15:00:45Z")\
**Posts on this page:** 6\
**Page:** 1

<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:** [May 1, 2018, 3:00pm UTC](https://discourse.itk.org/t/filterwatcher/882/1 "2018-05-01T15:00:46Z")

</div>

`FilterWatcher` class from [itkFilterWatcher.h](https://github.com/InsightSoftwareConsortium/ITK/blob/dd673a7a7b32f2d7fc2278c0f8674b40a6272e48/Modules/Core/TestKernel/include/itkFilterWatcher.h) is not in `itk::` namespace. I added in [issue](https://insightsoftwareconsortium.atlassian.net/projects/ITK/issues/ITK-3649). Should we move it there?

This [patch](http://review.source.kitware.com/#/c/23381/) fixes an unrelated bug in that class.

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [May 1, 2018, 10:30pm UTC](https://discourse.itk.org/t/filterwatcher/882/2 "2018-05-01T22:30:05Z")

</div>

Maybe a more specific name should be used if it is added to the ITK namespace.

---

<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:** [May 2, 2018, 2:26pm UTC](https://discourse.itk.org/t/filterwatcher/882/3 "2018-05-02T14:26:34Z")

</div>

Perhaps add it to `itk::Testing::` namespace? The file location is already suggestive of that.

---

<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:** [May 3, 2018, 8:16pm UTC](https://discourse.itk.org/t/filterwatcher/882/4 "2018-05-03T20:16:34Z")

</div>

There is already a [SimpleFilterWatcher](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkSimpleFilterWatcher.h). Perhaps one of them is redundant? I will look into it later.

---

<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:** [May 3, 2018, 9:43pm UTC](https://discourse.itk.org/t/filterwatcher/882/5 "2018-05-03T21:43:21Z")

</div>

There is also [itkXMLFilterWatcher.h](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkXMLFilterWatcher.h) which derives from `SimpleFilterWatcher`. The `FilterWatcher` in Testing dir should at least derive from `SimpleFilterWatcher`, if it needs to exist at all. Adding to a TODO list. If someone else wants to take over, just write here.

---

<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:** [May 7, 2018, 5:14pm UTC](https://discourse.itk.org/t/filterwatcher/882/6 "2018-05-07T17:14:48Z")

</div>

I just submitted a [patch](http://review.source.kitware.com/#/c/23415/) to reduce duplication.
