# Monitoring registration progress in python - and status of itk vs simpleitk for registration

**URL:** https://discourse.itk.org/t/monitoring-registration-progress-in-python-and-status-of-itk-vs-simpleitk-for-registration/3051
**Category:** Beginner Questions
**Tags:** simpleitk, registration, python
**Created:** [May 8, 2020, 1:56pm UTC](https://discourse.itk.org/t/monitoring-registration-progress-in-python-and-status-of-itk-vs-simpleitk-for-registration/3051 "2020-05-08T13:56:24Z")
**Posts on this page:** 1
**Showing post:** 8

<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 14, 2020, 2:54am UTC](https://discourse.itk.org/t/monitoring-registration-progress-in-python-and-status-of-itk-vs-simpleitk-for-registration/3051/8 "2020-05-14T02:54:24Z")

</div>

> [@tvercaut](#):
>
> Searching for `itk.Command` and `python` in google or discourse did not (at least easily) lead to any example.

Any `itk.Object` in Python can be passed a Python callable, i.e. a Python function on a Python class that has a ` __call__ ` method to its `AddObserver` method. [`AddObserver`](https://itk.org/Doxygen/html/classitk_1_1Object.html#a23703e82fa4a979fd512528f471606a0) takes the specific `itk.EventObject` to be observed along with the command to execute when the event occurs.

Here is an example:

```auto
import itk

image = itk.imread('/home/matt/data/aneurism.nrrd')

normalizer = itk.NormalizeImageFilter.New(image)

def my_python_function():
    print('hey from a python function')
normalizer.AddObserver(itk.StartEvent(), my_python_function)

normalizer.Update()

```

The examples are in need of updates 🙂 📖

---

_[View the full topic](https://discourse.itk.org/t/monitoring-registration-progress-in-python-and-status-of-itk-vs-simpleitk-for-registration/3051)._
