# Observing Only Threshold or Window/Level changes of a display node

**URL:** <https://discourse.slicer.org/t/observing-only-threshold-or-window-level-changes-of-a-display-node/17360>\
**Category:** Development\
**Created:** [April 27, 2021, 6:59pm UTC](https://discourse.slicer.org/t/observing-only-threshold-or-window-level-changes-of-a-display-node/17360 "2021-04-27T18:59:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathanbmnt](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nathanbmnt](https://discourse.slicer.org/u/nathanbmnt)\
**Post date:** [April 27, 2021, 6:59pm UTC](https://discourse.slicer.org/t/observing-only-threshold-or-window-level-changes-of-a-display-node/17360/1 "2021-04-27T18:59:48Z")

</div>

Hello,  
I have a module where I want to do calculations every time a volume node’s window/level or threshold are changed. Right now my observation is just of the modified event of the display node which is very general:

`volume.GetDisplayNode().AddObserver(vtk.vtkCommand.ModifiedEvent, self.onVolumeDisplayNodeModified)`

Is there a way to only observe W/L or threshold changes?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 27, 2021, 7:00pm UTC](https://discourse.slicer.org/t/observing-only-threshold-or-window-level-changes-of-a-display-node/17360/2 "2021-04-27T19:00:58Z")

</div>

You can check the source code, but no, I don’t think there’s a custom event for that. We’d probably accept a PR to add that.
