[vtkusers] VTK Time support

Evan Kao tossin at gmail.com
Fri May 22 16:17:17 EDT 2015


Hello Dan,

Thanks for the info.  In this case, the VTK counterparts seem to be
straightforward, but I think there might be something going on in Paraview
behind the scenes that I don't understand, especially since not all readers
seem to be able to handle time-dependent data.

For instance, reading in time-dependent EnSight data into ParaView and
applying the Temporal Interpolator filter is pretty trivial.  But I can't
figure out how to replicate this in VTK using the related filters
vtkGenericEnSightReader and vtkTemporalInterpolator, since the former
doesn't seem to innately read time series (it will can 1 timepoint at a
time).

I'm specifically wondering if I can there is a reader and corresponding
data format that exists that would allow me to simply use its output as the
input to a streaming filter like:

reader = vtk.vtkSomeReader()
reader.SetFileName(filename)
ti = vtk.vtkTemporalInterpolator()
ti.SetInputConnection(reader.GetOutputPort())
ti.Update()

But it seems like I probably can't avoid learning the VTK Pipeline and
using vtkPythonAlgorithm or vtkProgrammableSource/Filter.


On a related note, in my attempts to emulate some Paraview features, I've
tried playing around with some of Paraview-specific VTK classes by
importing from paraview.pvvtkextensions, but I get a TypeError ("method
requires a VTK object") when I attempt to mix and match VTK objects that
were created using another VTK library, e.g.:

import paraview.pvvvtkextensions as pvvtk
import vtk

a = pvvtk.vtkPGenericEnsightReader()
b = vtk.vtkTemporalInterpolator()
b.SetInputConnection(a.GetOutputPort())

TypeError: SetInputData argument 1: method requires a VTK object

I noticed this occurs when I try to mix and match VTK versions (e.g. 6.1
and 5.10), but in this case, both versions of VTK are the same (6.1).
Paraview and VTK were both installed using binaries.  Why does this occur,
and is there a way to avoid this?

Thanks,
Evan Kao

On Fri, May 22, 2015 at 7:07 AM, Dan Lipsa <dan.lipsa at kitware.com> wrote:

> You can see the vtk class used by a particular ParaView filter in
> ./ParaViewCore/ServerManager/SMApplication/Resources/filters.xml
>
> Search for the filter name in name="..." attribute, the class will be
> specified in class="...".
> There is also a readers.xml file in the same folder to look for readers.
>
> Dan
>
>
>
> On Thu, May 21, 2015 at 6:45 PM, Evan Kao <tossin at gmail.com> wrote:
>
>> Thanks for the explanation.  I had another related question when it comes
>> to reading (and possibly writing) data as a time series.  Is it possible to
>> emulate in VTK say a very simple Paraview pipeline, where I basically just
>> apply 2 classes, a reader and a streaming filter e.g. the equivalent of
>> File > Open, Filters > Temporal Interpolator in Paraview?  And if so, which
>> readers/file formats could work?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150522/9a30729b/attachment.html>


More information about the vtkusers mailing list