# how to get the individual polygon from the vtkpolydatareader (\*.vtk)

**URL:** <https://discourse.vtk.org/t/how-to-get-the-individual-polygon-from-the-vtkpolydatareader-vtk/12040>\
**Category:** Development\
**Tags:** vtkjs\
**Created:** [July 27, 2023, 9:14am UTC](https://discourse.vtk.org/t/how-to-get-the-individual-polygon-from-the-vtkpolydatareader-vtk/12040 "2023-07-27T09:14:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthilgis](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@senthilgis](https://discourse.vtk.org/u/senthilgis)\
**Post date:** [July 27, 2023, 9:14am UTC](https://discourse.vtk.org/t/how-to-get-the-individual-polygon-from-the-vtkpolydatareader-vtk/12040/1 "2023-07-27T09:14:35Z")

</div>

Hi,

Can anyone help me to get the separate polygon from the set of polys array ?  
var reader = vtk.IO.Legacy.vtkPolyDataReader.newInstance();  
const polydata = reader.getOutputData();  
const polys = polydata.getPolys().getData();  
from the 1D array of point id how to get the total number of individual polygons point id ?
