[vtkusers] Time series in a VTI

Stephen Hamilton stephenshamilton at gmail.com
Tue Jul 21 13:31:34 EDT 2015


I'm trying to built a single VTI file with multiple time steps, and I can't
quite figure it out.  I have data that is in image data format, and I can
save that as a single VTI file.  I would like to iterate through multiple
images and save them to a single VTI file that would show up in ParaView as
an image with multiple time steps.  I've been able to append them together
along an axis with vtkImageAppend (see below), but that isn't exactly what
I need.

Here is a snip of the code I have now:
writer = vtk.vtkXMLImageDataWriter()
writer.SetTimeStepRange(ts,te)
writer.SetNumberOfTimeSteps(te-ts)
writer.SetFileName(tmp.name)
a = vtk.vtkImageAppend()
for timestep in range(ts,te):
    image = odbccutout.OdbcCutout().getvtkimage(webargs,timestep)
    a.AddInputData(image)
    a.Update()
writer.SetInputData(a.GetOutput())
writer.Write()


Any help would be appreciated!
Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150721/45ad5bd8/attachment.html>


More information about the vtkusers mailing list