<div dir="ltr">Evan,<div>Probably the easiest route is to directly use ParaView from python, instead of trying to replicate ParaView behavior using VTK.</div><div><br></div><div>Checkout </div><div><a href="http://www.paraview.org/paraview-guide/">http://www.paraview.org/paraview-guide/</a><br></div><div><br></div><div>You'll have to use pvpython so checkout all sections that mention this in their title. For instance section 2.2.1 deals with temporal file series.</div><div><br></div><div>Dan</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 22, 2015 at 4:17 PM, Evan Kao <span dir="ltr"><<a href="mailto:tossin@gmail.com" target="_blank">tossin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello Dan,<br><br></div>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.<br><br></div><div>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).<br></div><div><br>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:<br><br></div><div><font size="2"><span style="font-family:monospace,monospace">reader = vtk.vtkSomeReader()<br></span></font></div><div><font size="2"><span style="font-family:monospace,monospace">reader.SetFileName(filename)<br>ti = vtk.vtkTemporalInterpolator()<br>ti.SetInputConnection(reader.GetOutputPort())<br></span></font></div><div><font size="2"><span style="font-family:monospace,monospace">ti.Update()</span></font><br></div><div><br></div><div>But it seems like I probably can't avoid learning the VTK Pipeline and using vtkPythonAlgorithm or vtkProgrammableSource/Filter.<br><br><br></div><div>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.:<br><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">import paraview.pvvvtkextensions as pvvtk<br></span></div><div><span style="font-family:monospace,monospace">import vtk<br><br></span></div><div><span style="font-family:monospace,monospace">a = pvvtk.vtkPGenericEnsightReader()<br></span></div><div><span style="font-family:monospace,monospace">b = vtk.vtkTemporalInterpolator()<br></span></div><div><span style="font-family:monospace,monospace">b.SetInputConnection(a.GetOutputPort())<br></span></div><div><span style="font-family:monospace,monospace"><br><span style="color:rgb(255,0,0)">TypeError: SetInputData argument 1: method requires a VTK object</span></span><br><br>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?<br><br></div><div>Thanks,<br></div><div>Evan Kao<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 22, 2015 at 7:07 AM, Dan Lipsa <span dir="ltr"><<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can see the vtk class used by a particular ParaView filter in<div>./ParaViewCore/ServerManager/SMApplication/Resources/filters.xml<br></div><div><br></div><div>Search for the filter name in name="..." attribute, the class will be specified in class="...".</div><div>There is also a readers.xml file in the same folder to look for readers.</div><span><font color="#888888"><div><br></div><div>Dan</div><div><br></div><div><br></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 21, 2015 at 6:45 PM, Evan Kao <span dir="ltr"><<a href="mailto:tossin@gmail.com" target="_blank">tossin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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?</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>