[vtkusers] combine vtk

Meehan, Bernard MEEHANBT at nv.doe.gov
Thu Sep 25 21:08:02 EDT 2014

This is a python script, and I haven't actually run this
but it should work something like the following:

import glob, vtk

# get a list of VTK polydata files in your current directory
files = glob.glob("*vtp")

# create an append filter to hold your data
append = vtk.vtkAppendPolyData()

# loop over your files
for f in files:
  rdr = vtk.vtkPolyDataReader()

# make sure your data is updated

# write out your appended data
writer = vtk.vtkPolyDataWriter()

On 9/25/14 3:11 PM, "jetvermillion" <mattgoh01 at gmail.com<mailto:mattgoh01 at gmail.com>> wrote:

Thanks for the link. Unfortunately I'm not a programmer by any means, so I'm
still a bit lost. I have VTK and vtkAppendFilter built on my machine. Could
you give me an example on how to read in the data using vtkPolyDataReader? I
have a general understanding on what tools' functions, but not so much on
how to execute them. Thank you

View this message in context: http://vtk.1045678.n5.nabble.com/combine-vtk-tp5728850p5728900.html
Sent from the VTK - Users mailing list archive at Nabble.com.
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140926/e2b9680a/attachment.html>

More information about the vtkusers mailing list