# Hide cells in vtk.js

**URL:** https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735
**Category:** vtk.js
**Tags:** vtkjs
**Created:** [June 17, 2025, 8:26am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735 "2025-06-17T08:26:28Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![davsch](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@davsch](https://discourse.vtk.org/u/davsch)
#### Post date: [June 17, 2025, 8:26am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/1 "2025-06-17T08:26:28Z")

</div>

Is there a way to hide specific cells in vtk.js?  
Something like scalar celldata with a specific value don’t get rendered.

Already tried assigning alpha value to a LUT or hiding specific points with ThresholdPoints and trying to map the filtered cells with the original cells, but sadly didn’t get my desired results.

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [June 17, 2025, 8:16pm UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/2 "2025-06-17T20:16:12Z")

</div>

Maybe use the vtk threshold filter

---

<div class="post-metadata">

### Author: ![davsch](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@davsch](https://discourse.vtk.org/u/davsch)
#### Post date: [June 18, 2025, 5:26am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/3 "2025-06-18T05:26:28Z")

</div>

Afaik vtk.js only has the ThresholdPoints, right? Because I didn’t find a “normal” threshold filter like vtk C++ has in the docs.

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [June 18, 2025, 6:49am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/4 "2025-06-18T06:49:45Z")

</div>

for which kind of data are you looking to process.is it VTU?

---

<div class="post-metadata">

### Author: ![davsch](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@davsch](https://discourse.vtk.org/u/davsch)
#### Post date: [June 18, 2025, 1:24pm UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/5 "2025-06-18T13:24:30Z")

</div>

Sorry I forgot to write it in the question 😅 It’s polydata/VTP

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [June 18, 2025, 1:36pm UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/6 "2025-06-18T13:36:55Z")

</div>

use `vtkTableBasedClipDataSet`

---

<div class="post-metadata">

### Author: ![davsch](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@davsch](https://discourse.vtk.org/u/davsch)
#### Post date: [June 23, 2025, 8:13am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/7 "2025-06-23T08:13:45Z")

</div>

Sorry for the late answer, but I don’t find `vtkTableBasedClipDataSet` in the vtk.js docs or in the GitHub repo. Sadly the data I get from the server isn’t created with vtk C++ so I have to rely on vtk.js

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [June 24, 2025, 9:34am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/8 "2025-06-24T09:34:25Z")

</div>

Then no other way than vtkThreshold

---

<div class="post-metadata">

### Author: ![davsch](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@davsch](https://discourse.vtk.org/u/davsch)
#### Post date: [June 25, 2025, 10:41am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/9 "2025-06-25T10:41:57Z")

</div>

That’s something I hoped I wouldn’t hear 😅 but thanks for the help anyways! 👍

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [June 25, 2025, 1:30pm UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/10 "2025-06-25T13:30:24Z")

</div>

maybe try to set transparency to particular cells based on scalar value

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [September 28, 2025, 10:00am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/11 "2025-09-28T10:00:26Z")

</div>

Yes, you should be able to use a LUT with translucency to hide cells.

Can you please share your code (in a reproductible way) ?

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [December 31, 2025, 6:20am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735/12 "2025-12-31T06:20:20Z")

</div>

I replicated that in wasm
