# Adaptive denoising filter in ITK?

**URL:** https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480
**Category:** Community
**Created:** [September 22, 2020, 4:43pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480 "2020-09-22T16:43:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ntustison](https://discourse.itk.org/user_avatar/discourse.itk.org/ntustison/32/462_2.png) [@ntustison](https://discourse.itk.org/u/ntustison)
#### Post date: [September 22, 2020, 4:43pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/1 "2020-09-22T16:43:34Z")

</div>

I’m guessing this is a question for @matt.mccormick and potentially others (e.g., @blowekamp@hjmjohnson).

With the most recent FreeSurfer release, the developers added some ITK-based functionality originally developed for the ANTs toolkit, specifically [N4](https://github.com/freesurfer/freesurfer/tree/dev/AntsN4BiasFieldCorrectionFs) and an [adaptive denoising filter](https://github.com/freesurfer/freesurfer/tree/dev/AntsDenoiseImageFs). Although the former has been in ITK for quite some time, the latter is not currently in ITK. And while I’d like to think I write somewhat decent code, I clearly recognize the significant potential improvements and vetting that can be provided by the ITK community and would love for this latter filter to go through the same process. That being said, what is the current mechanism for introducing new functionality to the toolkit?

ETA: I should mention that I wrote an Insight Journal [article](http://insight-journal.org/browse/publication/982) for this contribution some time ago.

Thanks,  
Nick

---

<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: [September 22, 2020, 5:43pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/2 "2020-09-22T17:43:11Z")

</div>

Hello Nick,

How does creating a remote module sound for the contribution?

---

<div class="post-metadata">

### Author: ![ntustison](https://discourse.itk.org/user_avatar/discourse.itk.org/ntustison/32/462_2.png) [@ntustison](https://discourse.itk.org/u/ntustison)
#### Post date: [September 22, 2020, 5:59pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/3 "2020-09-22T17:59:40Z")

</div>

Thanks Brad. I’m fine with whatever is deemed the most appropriate. If a remote module works, then let’s do that. How would I go about setting that up? Is there an example or a tutorial?

---

<div class="post-metadata">

### Author: ![jhlegarreta](https://discourse.itk.org/user_avatar/discourse.itk.org/jhlegarreta/32/476_2.png) [@jhlegarreta](https://discourse.itk.org/u/jhlegarreta)
#### Post date: [September 22, 2020, 6:00pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/4 "2020-09-22T18:00:29Z")

</div>

To complete Brad’s answer, remotes can easily be created using this template:

> **[InsightSoftwareConsortium/ITKModuleTemplate](https://github.com/InsightSoftwareConsortium/ITKModuleTemplate)**
>
> A template to start an ITK Module. Contribute to InsightSoftwareConsortium/ITKModuleTemplate development by creating an account on GitHub.

Instructions are provided, and it essentially requires giving `cookiecutter` the necessary input data.

Adding testing, examples and Python wrapping would test the robustness of the module, increase the adoption of the module, and allow the classes to make it into ITK proper in a shorter time. There is a scoring system based on the robustness and coverage, among others, of the remotes.

The template will add the testing workflows based on `GitHub Actions`.

So if you are able to provide testing data (or confirm if the data in the IJ journal still applies), the community can help to put in place the rest of the pieces 🚀.

Other than that, at the time the IJ was written, was the code submitted to the `Review` folder that existed at the time in ITK? I seem not to find it: maybe the `Review` folder was pulled out of the source tree?

Thanks Nick 🔝 !

---

<div class="post-metadata">

### Author: ![ntustison](https://discourse.itk.org/user_avatar/discourse.itk.org/ntustison/32/462_2.png) [@ntustison](https://discourse.itk.org/u/ntustison)
#### Post date: [September 22, 2020, 6:07pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/5 "2020-09-22T18:07:41Z")

</div>

Thanks @jhlegarreta . I don’t believe it was ever submitted to the Review folder but it was a long time ago so I don’t remember. However, this module template is extremely helpful. Thanks again.

---

<div class="post-metadata">

### Author: ![jhlegarreta](https://discourse.itk.org/user_avatar/discourse.itk.org/jhlegarreta/32/476_2.png) [@jhlegarreta](https://discourse.itk.org/u/jhlegarreta)
#### Post date: [September 22, 2020, 6:10pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/6 "2020-09-22T18:10:50Z")

</div>

👍 Let us know how it goes or if you find difficulties. Tag us in `GitHub` if necessary !

Happy to help you with this !

---

<div class="post-metadata">

### Author: ![ntustison](https://discourse.itk.org/user_avatar/discourse.itk.org/ntustison/32/462_2.png) [@ntustison](https://discourse.itk.org/u/ntustison)
#### Post date: [September 28, 2020, 5:32pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/7 "2020-09-28T17:32:23Z")

</div>

Just FYI for anyone who is interested, the module is [here](https://github.com/InsightSoftwareConsortium/ITK/pull/2018) . Thanks everybody and @dzenanz for guiding me through the process. I’m assuming my responsibilities for this initial commit is complete and now the next steps are with the community for uptake, correct?

---

<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: [September 28, 2020, 5:47pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/8 "2020-09-28T17:47:59Z")

</div>

Yes, wait for people to start using it. That will be easier once 5.2 is released, which will include `AdaptiveDenoising`.

Maybe more important is to have an example image before and after denoising, so people can see what it is supposed to do. Maybe even compare it to some other common choices like bilateral or median. Probably the best place for that would be the [readme](https://github.com/ntustison/ITKAdaptiveDenoising/blob/master/README.rst).

---

<div class="post-metadata">

### Author: ![ntustison](https://discourse.itk.org/user_avatar/discourse.itk.org/ntustison/32/462_2.png) [@ntustison](https://discourse.itk.org/u/ntustison)
#### Post date: [September 28, 2020, 6:19pm UTC](https://discourse.itk.org/t/adaptive-denoising-filter-in-itk/3480/9 "2020-09-28T18:19:05Z")

</div>

Perfect. Thanks.
