# vtkCellGrid Examples?

**URL:** https://discourse.vtk.org/t/vtkcellgrid-examples/15503
**Category:** Support
**Created:** [April 16, 2025, 3:33am UTC](https://discourse.vtk.org/t/vtkcellgrid-examples/15503 "2025-04-16T03:33:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![raungst](https://discourse.vtk.org/user_avatar/discourse.vtk.org/raungst/32/1965_2.png) [@raungst](https://discourse.vtk.org/u/raungst)
#### Post date: [April 16, 2025, 3:33am UTC](https://discourse.vtk.org/t/vtkcellgrid-examples/15503/1 "2025-04-16T03:33:40Z")

</div>

Hello,

I’m trying to look into the feasibility of replacing an unstructured grid in my program with a vtkCellGrid to be able to support discontinuous contours. Are there any simple examples on how to get the connectivity and cell type defined? And how to set the contour? It’s not obvious to me after looking through the object documentation and the example it links.

Thanks!  
Robby

---

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dcthomp/32/60_2.png) [@dcthomp](https://discourse.vtk.org/u/dcthomp)
#### Post date: [April 17, 2025, 2:16pm UTC](https://discourse.vtk.org/t/vtkcellgrid-examples/15503/2 "2025-04-17T14:16:27Z")

</div>

@raungst vtkCellGrid does not yet provide isocontouring. I have some ongoing work to address it but it will not be more than a prototype for the coming year (unless we get a grant or other funding to let me spend more time on it).

---

<div class="post-metadata">

### Author: ![raungst](https://discourse.vtk.org/user_avatar/discourse.vtk.org/raungst/32/1965_2.png) [@raungst](https://discourse.vtk.org/u/raungst)
#### Post date: [April 18, 2025, 9:27pm UTC](https://discourse.vtk.org/t/vtkcellgrid-examples/15503/3 "2025-04-18T21:27:45Z")

</div>

At the moment, I’m just looking for an example to get something simple up and running. Basically the code that sets up a few cells and puts a contour on it like I’ve seen in the pictures in your blog posts. Most of the testing examples load data from .dg files that I can’t seem to find, so its hard to figure out how the grid gets set up.

Thanks!

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [April 22, 2025, 7:45pm UTC](https://discourse.vtk.org/t/vtkcellgrid-examples/15503/4 "2025-04-22T19:45:44Z")

</div>

Hello,

I have an example of how to render contours from values of a `vtkImageData` object (regular cells). If you’re interested, I can share the code here.

best,

PC
