# vtkLabeledDataMapper =\> all texts disappearing issue

**URL:** https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402
**Category:** Support
**Created:** [January 7, 2023, 5:02pm UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402 "2023-01-07T17:02:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Olivier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Olivier](https://discourse.vtk.org/u/Olivier)
#### Post date: [January 7, 2023, 5:02pm UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/1 "2023-01-07T17:02:06Z")

</div>

Hi friends,

I’m using a vtkLabeledDataMapper to display multiple strings at 3D positions.  
Mapper is filled in with a vtkPolyData containing points (for positions) and data arrays (one for strings and one for types = text properties).

Works great, except that if the very last point of the PolyData goes out of the viewport (user pans the camera), then the whole Actor disappears (all texts become invisible).

Initial scene =\> 4 texts visibles  
The upper-left-most text is the last text of the Mapper / PolyData.

 ![OK](https://discourse.vtk.org/uploads/default/original/2X/a/ad9b646437984aeea66dd4c9b1f45f1a9484c1ee.jpeg)

After a Left PAN of the camera =\> 4 texts are still visible

 ![OK 2](https://discourse.vtk.org/uploads/default/original/2X/1/199d8ee87bc9ce91e45ce69a0125dabaf6515286.jpeg)

After a small additional Left PAN =\> texts hidden

 ![KO](https://discourse.vtk.org/uploads/default/original/2X/4/43627028f65ab97842f6c340a8948e074e880d90.jpeg)

Same thing but with another text out of viewport =\> no issue

 ![OK 3](https://discourse.vtk.org/uploads/default/original/2X/2/29c034dcf1150c71db5d37b996edc09d0cfa4945.jpeg)

Any idea ?  
Thanks !

---

<div class="post-metadata">

### Author: ![Timothee\_Chabat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/timothee_chabat/32/3234_2.png) [@Timothee\_Chabat](https://discourse.vtk.org/u/Timothee_Chabat)
#### Post date: [January 9, 2023, 8:34am UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/2 "2023-01-09T08:34:16Z")

</div>

Hello,

it is very likely that this just an error in the implementation of the mapper. I’ve opened an issue here : [https://gitlab.kitware.com/vtk/vtk/-/issues/18773](https://gitlab.kitware.com/vtk/vtk/-/issues/18773) .

Feel free to add minimal self-contained steps to reproduce in the issue, that would help a lot whoever wants to solve this 🙂

---

<div class="post-metadata">

### Author: ![Olivier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Olivier](https://discourse.vtk.org/u/Olivier)
#### Post date: [January 9, 2023, 9:34am UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/3 "2023-01-09T09:34:28Z")

</div>

Thanks Timothee !

---

<div class="post-metadata">

### Author: ![Olivier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Olivier](https://discourse.vtk.org/u/Olivier)
#### Post date: [January 18, 2023, 2:35pm UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/4 "2023-01-18T14:35:07Z")

</div>

Timothee,

I’ve dug a little into vtkLabeledDataMapper’s code, and can’t see an obvious element that could explain the above behavior.  
I guess the problem comes from a more general treatment in the rendering pipe, something that thinks the Mapper is out of sight, and discard it totally.

I’ve searched for it in VTK source (Actor2D, Mapper, etc …) but it’s not that easy.  
Do you have any idea Timothee that could narrow down my search ?

---

<div class="post-metadata">

### Author: ![Timothee\_Chabat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/timothee_chabat/32/3234_2.png) [@Timothee\_Chabat](https://discourse.vtk.org/u/Timothee_Chabat)
#### Post date: [January 19, 2023, 8:46am UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/5 "2023-01-19T08:46:21Z")

</div>

Indeed, maybe the problem isn’t related to vtkLabeledDataMapper at all. I tried using the example here [https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabeledDataMapper/](https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabeledDataMapper/) but couldn’t reproduce your issue. Sadly I don’t have any ideas that could explain the behavior you’re observing.

---

<div class="post-metadata">

### Author: ![Olivier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Olivier](https://discourse.vtk.org/u/Olivier)
#### Post date: [January 19, 2023, 10:18am UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/6 "2023-01-19T10:18:09Z")

</div>

“Sample” not showing the issue is very interesting, I’ll go that way by searching for differences with my own code.  
Tks Timothee !

---

<div class="post-metadata">

### Author: ![Olivier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Olivier](https://discourse.vtk.org/u/Olivier)
#### Post date: [January 28, 2023, 10:12am UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/7 "2023-01-28T10:12:17Z")

</div>

Issue spotted inside my VTK wrapper …  
Very sorry for this “false positive”, and thanks again Timothee for your time/tests.

---

<div class="post-metadata">

### Author: ![Timothee\_Chabat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/timothee_chabat/32/3234_2.png) [@Timothee\_Chabat](https://discourse.vtk.org/u/Timothee_Chabat)
#### Post date: [January 30, 2023, 8:46am UTC](https://discourse.vtk.org/t/vtklabeleddatamapper-all-texts-disappearing-issue/10402/8 "2023-01-30T08:46:19Z")

</div>

No worries, glad that you found your issue 🙂 do not hesitate to tag your message as the solution to close this thread
