[Paraview] How to merge .vtk files to visualize the result in Paraview

Ethan Hereth e.a.hereth at gmail.com
Mon Sep 19 15:35:13 EDT 2016


Furthermore, if you end up opening them all individually in paraview, you
can select all of the input files in Pipeline Browser and then run the
Group Datasets filter on them. This is a poor man's solution I think, but
in a pinch it works well.

Cheers!

Ethan Alan

On Mon, Sep 19, 2016 at 2:32 PM Christopher Neal <chrisneal at snumerics.com>
wrote:

> Hey Brennen,
>
> I’m not an expert at Paraview’s IO system, but I believe that individual
> .vtk files would have to be opened individually i.e. Paraview cannot stitch
> the .vtk files together.  If you want to be able to open a single file and
> have the data for each processor’s output file be shown in one coherent
> data set, then I think you should look into the parallel xml file format
> that Paraview uses.
>
> A PDF of VTK file formats (XML format is on page 11 of the document):
> http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf
>
>
> There is probably a better way to do this, but this is what I would do.
> 1.) Write a paraview python script to first convert all of the .vtk files
> to the newer xml format.  See:
> http://stackoverflow.com/questions/26158599/how-to-convert-vtk-legacy-files-to-vtu-format
>
>                 You will have to use the correct writer to write the
> proper XML file format for your data set type – See page 12 of that
> file-formats pdf that I posted above to see what types exist for the
> datasets
>
> 2.) Let’s assume your data is unstructured. You will now have data for
> each sub-domain written to a bunch of .vtu files. One .vtu file per
> processor, just like the .vtk files.  You can stitch all of these files
> together by using the parallel file format that VTK supports ( see page 16
> of that pdf ). You just need to write out a .pvtu file that essentially
> just has a list containing the name of every .vtu file.
>
> 3.) Paraview should be able to open this new .pvtu file and display all of
> the data for all of the sub-domains.
>
> Again, your xml file type might be .vti, .vtp, etc. depending on the data
> type that is being written to the .vtk files, structured, image, poly, etc.
>
> Hope this helps. If anyone has a more straightforward solution please
> share it.
>
> Best regards,
>
> Chris Neal
>
>
>
>
>
> *From: *ParaView <paraview-bounces at paraview.org> on behalf of Brennen
> Taylor <taylorbrennen731 at gmail.com>
> *Date: *Monday, September 19, 2016 at 12:13 AM
> *To: *<paraview at paraview.org>
> *Subject: *[Paraview] How to merge .vtk files to visualize the result in
> Paraview
>
>
>
> Dear All,
>
>
>
> I am using Paraview in order to visualize the result produced by parallel
> program.
>
> Each processor currently outputs its own .vtk files , which corresponsd to
> the value of the fields in the domain.
>
>
>
> I would like to know if there is a way of merging these .vtk files into
> one .vtk file so that I can visualize using Paraview.
>
>
>
>
>
>
>
> Thanks in advance !!
>
>
>
> Best ,
>
>
>
> Brennen
>
> _______________________________________________ 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
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160919/e3bf1a13/attachment.html>


More information about the ParaView mailing list