# vtkPythonAlgortim Modified() method - purpose ?

**URL:** https://discourse.vtk.org/t/vtkpythonalgortim-modified-method-purpose/14922
**Category:** Support
**Tags:** python
**Created:** [November 26, 2024, 11:22pm UTC](https://discourse.vtk.org/t/vtkpythonalgortim-modified-method-purpose/14922 "2024-11-26T23:22:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nicholas\_Yue](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicholas_yue/32/3751_2.png) [@Nicholas\_Yue](https://discourse.vtk.org/u/Nicholas_Yue)
#### Post date: [November 26, 2024, 11:22pm UTC](https://discourse.vtk.org/t/vtkpythonalgortim-modified-method-purpose/14922/1 "2024-11-26T23:22:07Z")

</div>

I am learning about vtkAlgorithm via this [article](https://www.kitware.com/vtkpythonalgorithm-is-great/).

I see a mention of this call `self.Modified()`

I am unable to find any documentation of this method nor is there any similar counterpart on the C++ side of vtkAlgorithm.

What does it do within the context of Python that requires this call that we do not need to do in the context of C++ using vtkAlgorithm ?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 26, 2024, 11:31pm UTC](https://discourse.vtk.org/t/vtkpythonalgortim-modified-method-purpose/14922/2 "2024-11-26T23:31:05Z")

</div>

`Modified()` is a C++ method of vtkObject, and it applies to the C++ vtkAlgorithm in the same way as it does to vtkPythonAlgorithm. The only difference is that most of the C++ `Set` methods are implemented with `vtkSetMacro`, and this macro automatically calls `Modified()` when it sets the parameter.

As for the purpose of `Modified()`, it’s fundamental to the operation of the VTK pipeline. `Modified()` sets the algorithm’s timestamp, so that the pipeline knows that the algorithm has to be re-executed the next time the pipeline is updated.
