# vtkGeometryFilter output missing some cellData

**URL:** https://discourse.vtk.org/t/vtkgeometryfilter-output-missing-some-celldata/11685
**Category:** Support
**Created:** [June 12, 2023, 11:39am UTC](https://discourse.vtk.org/t/vtkgeometryfilter-output-missing-some-celldata/11685 "2023-06-12T11:39:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Albers\_Steven](https://discourse.vtk.org/user_avatar/discourse.vtk.org/albers_steven/32/5242_2.png) [@Albers\_Steven](https://discourse.vtk.org/u/Albers_Steven)
#### Post date: [June 12, 2023, 11:39am UTC](https://discourse.vtk.org/t/vtkgeometryfilter-output-missing-some-celldata/11685/1 "2023-06-12T11:39:18Z")

</div>

I want to convert an unstructured grid to polydata for rendering. However, when I use vtkGeometryFilter for the conversion, I noticed that some CellData arrays are missing in the resulting file. The original vtk file contains 7 celldata arrays, but the converted file only has 3 celldata arrays. I’m wondering why some attributes are missing.

Meanwhile, when I use ParaView’s ExtractSurface, all the attributes are preserved. So, I would like to understand why vtkGeometryFilter is missing attributes and if there are any additional parameters that need to be configured.

Here is my vtk file.  
[job3403.vtk.zip](https://discourse.vtk.org/uploads/short-url/kadTNUnMJwHhzVg4hfnygYabtVl.zip) (1.5 MB)

 ![image](https://discourse.vtk.org/uploads/default/original/2X/9/9032691a8f40b909256250a219b8a6e131704961.png)

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [June 12, 2023, 2:27pm UTC](https://discourse.vtk.org/t/vtkgeometryfilter-output-missing-some-celldata/11685/2 "2023-06-12T14:27:27Z")

</div>

Try using that filter instead [https://vtk.org/doc/nightly/html/classvtkDataSetSurfaceFilter.html](https://vtk.org/doc/nightly/html/classvtkDataSetSurfaceFilter.html)

I think that is the one ParaView use under the cover.

---

<div class="post-metadata">

### Author: ![Albers\_Steven](https://discourse.vtk.org/user_avatar/discourse.vtk.org/albers_steven/32/5242_2.png) [@Albers\_Steven](https://discourse.vtk.org/u/Albers_Steven)
#### Post date: [June 14, 2023, 3:13am UTC](https://discourse.vtk.org/t/vtkgeometryfilter-output-missing-some-celldata/11685/3 "2023-06-14T03:13:34Z")

</div>

I don’t try vtkDataSetSurfaceFilter, I’ve solved this problem by set vtkDataReader to read all props, like this.  
[classvtkDataReader](https://vtk.org/doc/nightly/html/classvtkDataReader.html)

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

And I also noticed that this problem only happen when I read a legacy vtk file with ascii encode, so I must to manually set read all scalars/vectors/tensors, And I read a vtk file with binary encode, I can read all props.

Maybe there be some documentation work for your team to notice people who use classvtkDataReader.

---

<div class="post-metadata">

### Author: ![Albers\_Steven](https://discourse.vtk.org/user_avatar/discourse.vtk.org/albers_steven/32/5242_2.png) [@Albers\_Steven](https://discourse.vtk.org/u/Albers_Steven)
#### Post date: [June 14, 2023, 3:18am UTC](https://discourse.vtk.org/t/vtkgeometryfilter-output-missing-some-celldata/11685/4 "2023-06-14T03:18:30Z")

</div>

For those vtk legacy file with ascii encode. classvtkDataReader will read the first scalars/vectors/tensors by default, so you should set to read all scalars/vectors/tensors manually.
