# Some questions about changes in the image display

**URL:** https://discourse.vtk.org/t/some-questions-about-changes-in-the-image-display/10566
**Category:** Web
**Created:** [January 31, 2023, 1:44am UTC](https://discourse.vtk.org/t/some-questions-about-changes-in-the-image-display/10566 "2023-01-31T01:44:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![HWsir](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/9dc877/32.png) [@HWsir](https://discourse.vtk.org/u/HWsir)
#### Post date: [January 31, 2023, 1:44am UTC](https://discourse.vtk.org/t/some-questions-about-changes-in-the-image-display/10566/1 "2023-01-31T01:44:46Z")

</div>

What can I do to set a button on the page that controls the passing of parameters in the writing function, which affects the display of the image

 ![image](https://discourse.vtk.org/uploads/default/original/2X/0/0ea5385ac83a9e452d843abd427a6f36d9993768.png)

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [January 31, 2023, 4:22pm UTC](https://discourse.vtk.org/t/some-questions-about-changes-in-the-image-display/10566/2 "2023-01-31T16:22:01Z")

</div>

If you want to edit the opacity function, check out the [PiecewiseGaussianWidget](https://kitware.github.io/vtk-js/examples/PiecewiseGaussianWidget.html).

---

<div class="post-metadata">

### Author: ![HWsir](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/9dc877/32.png) [@HWsir](https://discourse.vtk.org/u/HWsir)
#### Post date: [February 1, 2023, 7:20am UTC](https://discourse.vtk.org/t/some-questions-about-changes-in-the-image-display/10566/3 "2023-02-01T07:20:14Z")

</div>

Can I rewrite this js example in python? Does python vtk have a similar widget？

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [February 7, 2023, 8:41pm UTC](https://discourse.vtk.org/t/some-questions-about-changes-in-the-image-display/10566/4 "2023-02-07T20:41:48Z")

</div>

vtk-python has no similar widget, so you would have to rewrite it there.

---

<div class="post-metadata">

### Author: ![HWsir](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/9dc877/32.png) [@HWsir](https://discourse.vtk.org/u/HWsir)
#### Post date: [February 8, 2023, 12:49am UTC](https://discourse.vtk.org/t/some-questions-about-changes-in-the-image-display/10566/5 "2023-02-08T00:49:24Z")

</div>

Thank you for your answer. This clarified my next thinking direction.
