Victor,

Off the top of my head, I can think of three different ways to do this:

(1) Put each cell-type in a separate *.vtp file. You can then load each cell-type separately or you can load them with a *.pvd meta-file (sample attached) as "one object" and use the Extract Block filter to display any number and combination of cell-types.

(2) You can use the EnSight format for your results. This format has a Part-construct that allows mixed-cell objects and that can be used to organize your cells any way you like, for example, by cell-type, by material, by sub-assemblies, ...  Again, the Extract Block filter can be used to display any number and combination of 'Parts.'

(3) When you write the *.vtp file assign each cell its vtk-cell-type
number as data, and then use the Threshold filter applied to the cell's cell-type value.

There are probably other ways as well.

Hope this helps.

Sam Key




On 12/15/2015 2:54 PM, Viktor Sip wrote:
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


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

<?xml version="1.0"?>
<VTKFile type="Collection" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
  <Collection>
    <DataSet part="0" file="test-frame/test-frame_0.vtu"/>
    <DataSet part="1" file="test-frame/test-frame_1.vtu"/>
    <DataSet part="2" file="test-frame/test-frame_2.vtu"/>
    <DataSet part="3" file="test-frame/test-frame_3.vtu"/>
  </Collection>
</VTKFile>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to