# How to display a filter option in an animated annotation?

**URL:** https://discourse.paraview.org/t/how-to-display-a-filter-option-in-an-animated-annotation/11165
**Category:** ParaView Support
**Created:** [January 14, 2023, 5:08pm UTC](https://discourse.paraview.org/t/how-to-display-a-filter-option-in-an-animated-annotation/11165 "2023-01-14T17:08:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![parajan](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/6a8cbe/32.png) [@parajan](https://discourse.paraview.org/u/parajan)
#### Post date: [January 14, 2023, 5:08pm UTC](https://discourse.paraview.org/t/how-to-display-a-filter-option-in-an-animated-annotation/11165/1 "2023-01-14T17:08:00Z")

</div>

I would like to create an animation of scanning though a static dataset, displaying the cross section and an annotation of the current slice offset, like in the following video:

[/uploads/default/original/2X/2/24615495699428180f459bbc2df829f3c1fe82e0.mp4](https://discourse.paraview.org/uploads/default/original/2X/2/24615495699428180f459bbc2df829f3c1fe82e0.mp4)

Unfortunately I can not find a way to include the slice offset (instead I am getting “(error)” in the top middle annotation).

1. I am not sure how to access previous filter options in an annotation filter.
2. Alternatively I tried to read out the current time via “t\_value” in the PythonAnnotation filter to calculate the current slice offset from it. I was optimistic, since it works with the AnnotateTime filter. However, I am getting the following error:

Failed to evaluate expression ‘“Time: %f” % t\_value’. The following exception stack should provide additional developer specific information. This typically implies a malformed expression. Verify that the expression is valid.

```auto
Variables in current scope are ['input', 'Normals'] 

Traceback (most recent call last):
  File "C:\Program Files\ParaView 5.10.1-MPI-Windows-Python3.9-msvc2017-AMD64\bin\Lib\site-packages\paraview\detail\annotation.py", line 95, in execute
    result = calculator.compute(inputs, expression, ns=ns)
  File "C:\Program Files\ParaView 5.10.1-MPI-Windows-Python3.9-msvc2017-AMD64\bin\Lib\site-packages\paraview\detail\calculator.py", line 146, in compute
    retVal = eval(subEx, globals(), mylocals)
  File "<string>", line 1, in <module>
NameError: name 't_value' is not defined

```

I am assuming this means that the Annotation filter can only access Point/Cell/Field data created by data sources, but not the time data created by the animation view?

My question is how can I either access the settings in a previous filter to display in the annotation filter or how can I access the time data created in the animation view?

The state file is attached:  
[static\_animation\_test.pvsm](https://discourse.paraview.org/uploads/short-url/3rkxbagjgexHjh4dhjYkqc7JBs4.pvsm) (889.7 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 17, 2023, 10:04am UTC](https://discourse.paraview.org/t/how-to-display-a-filter-option-in-an-animated-annotation/11165/2 "2023-01-17T10:04:46Z")

</div>

There is no t\_value as you are not animating with time but a property manually.

`points[0][2]` of the slice contains what you want though.

[static\_animation\_test\_kw.pvsm](https://discourse.paraview.org/uploads/short-url/r7t2JqStJclB88EKgeZTYe2T2Tx.pvsm) (926.3 KB)

---

<div class="post-metadata">

### Author: ![parajan](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/6a8cbe/32.png) [@parajan](https://discourse.paraview.org/u/parajan)
#### Post date: [January 18, 2023, 12:32pm UTC](https://discourse.paraview.org/t/how-to-display-a-filter-option-in-an-animated-annotation/11165/3 "2023-01-18T12:32:40Z")

</div>

Great! This seems to work!

Am I understanding correctly that this is the z-coordinate of the first point in the slice?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 18, 2023, 12:58pm UTC](https://discourse.paraview.org/t/how-to-display-a-filter-option-in-an-animated-annotation/11165/4 "2023-01-18T12:58:50Z")

</div>

Exactly.
