# How to use Image Iterators in right way

**URL:** https://discourse.itk.org/t/how-to-use-image-iterators-in-right-way/3171
**Category:** Beginner Questions
**Created:** [June 12, 2020, 12:41am UTC](https://discourse.itk.org/t/how-to-use-image-iterators-in-right-way/3171 "2020-06-12T00:41:08Z")
**Posts on this page:** 1
**Showing post:** 5

<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: [June 12, 2020, 5:19pm UTC](https://discourse.itk.org/t/how-to-use-image-iterators-in-right-way/3171/5 "2020-06-12T17:19:32Z")

</div>

> [@Amnesie](#):
>
> `openingFilter->SetInput(mathOperationFilter->GetOutput());`

This might need to be `openingFilter->SetInput(filter->GetOutput());`

---

_[View the full topic](https://discourse.itk.org/t/how-to-use-image-iterators-in-right-way/3171)._
