# \#observer

**URL:** https://discourse.itk.org/tag/observer/93.md

[Latest](https://discourse.itk.org/latest.md) · [Categories](https://discourse.itk.org/categories.md) · [Tags](https://discourse.itk.org/tags.md)

---

## [AddObserver on DataObject](https://discourse.itk.org/t/addobserver-on-dataobject/3275)

<div class="topic-metadata">

**Author:** [@Come](https://discourse.itk.org/u/Come)\
**Replies:** 3\
**Last updated:** [July 10, 2020, 5:51pm UTC](https://discourse.itk.org/t/addobserver-on-dataobject/3275 "2020-07-10T17:51:49Z")

</div>

Hi, I want to add an observer to an image to know when it is modified. I tried the code below based on this example. #include \<itkImage.h\> #include \<itkRandomImageSource.h\> #include \<itkCommand.h\> class MyCommand : pu…

---

## [Command: Execute with const or non-const object](https://discourse.itk.org/t/command-execute-with-const-or-non-const-object/1587)

<div class="topic-metadata">

**Author:** [@Gordian](https://discourse.itk.org/u/Gordian)\
**Replies:** 2\
**Last updated:** [February 12, 2019, 12:10pm UTC](https://discourse.itk.org/t/command-execute-with-const-or-non-const-object/1587 "2019-02-12T12:10:27Z")

</div>

Hello, i could not figure out when an itk::Event invokes virtual void Execute (Object \*caller, const EventObject &event) or virtual void Execute (const Object \*caller, const EventObject &event) In both cases the inv…
