[Paraview] Filter cell type from PolyData VTK file
Viktor Sip
viktor.sip at centrum.cz
Tue Dec 15 16:54:36 EST 2015
Dear all,
is there a way to filter and show only a specific cell type?
In my application I am exporting a PolyData VTK file containing some
Polys and Lines. When imported into Paraview, both Polys and Lines are
shown, and I did not find a simple way to show only Polys.
What I can do is to export additional CellData array with a number
specifying cell type and then apply Treshold in Paraview. However that
seems redundant, as the type is already stored in the file somewhere.
So my question is, is there a direct way?
Simplified example of the exported VTK file is attached.
Kind regards,
Viktor
-------------- next part --------------
<VTKFile type="PolyData" version="0.1" byte_order="LittleEndian">
<PolyData>
<Piece NumberOfPoints="3" NumberOfPolys="1" NumberOfLines="3">
<Points>
<DataArray NumberOfComponents="3" type="Float32" format="ascii">1 0 0 0 1 0 1 1 0 </DataArray>
</Points>
<Polys>
<DataArray type="Int32" Name="connectivity" format="ascii">0 1 2</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">3</DataArray>
</Polys>
<Lines>
<DataArray type="Int32" Name="connectivity" format="ascii">0 1 1 2 0 2</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">2 4 6</DataArray>
</Lines>
</Piece>
</PolyData>
</VTKFile>
More information about the ParaView
mailing list