Did you ever figure this out? I'm running into the exact same thing.<div><br></div><div>I just need to get the times associated with each timestep from an Exodus file. Everything else is working beautifully... I just want to display the current time in my GUI.</div>
<div><br></div><div>Any help here would be greatly appreciated!</div><div><br></div><div>Derek</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 10, 2012 at 10:44 AM, Nico Schlömer <span dir="ltr"><<a href="mailto:nico.schloemer@gmail.com" target="_blank">nico.schloemer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wasn't quite sure if this is the same thing since I then get<br>
<br>
================ *snip* ================<br>
rdr.GetOutputPortInformation(0).Get(vtkStreamingDemandDrivenPipeline.TIME_STEPS())<br>
---------------------------------------------------------------------------<br>
TypeError Traceback (most recent call last)<br>
<ipython-input-10-dae571687634> in <module>()<br>
----> 1 rdr.GetOutputPortInformation(0).Get(vtkStreamingDemandDrivenPipeline.TIME_STEPS())<br>
<br>
TypeError: arguments do not match any overloaded methods<br>
================ *snap* ================<br>
<br>
--Nico<br>
<br>
<br>
<br>
On Mon, Sep 10, 2012 at 2:18 PM, David Thompson<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a>> wrote:<br>
> Hi Nico,<br>
><br>
>> rdr = vtkExodusIIReader()<br>
>> ...<br>
>> rdr.GetOutputInformation(0)<br>
>><br>
>> yields and error saying that "GetOutputInformation" isn't a member of<br>
>> vtkExodusIIReader.<br>
>> From <<a href="http://www.vtk.org/doc/nightly/html/classvtkExodusIIReader-members.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkExodusIIReader-members.html</a>><br>
>> I see that it should be there though. Might this be a bug in the<br>
>> Python interface? This is with VTK 5.8.0.<br>
><br>
> I believe in VTK 5.8 it was named GetOutputPortInformation().<br>
><br>
> <a href="http://www.vtk.org/doc/release/5.8/html/a00128.html" target="_blank">http://www.vtk.org/doc/release/5.8/html/a00128.html</a><br>
><br>
> David<br>
><br>
>> On Sat, Sep 8, 2012 at 6:26 PM, David Thompson<br>
>> <<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a>> wrote:<br>
>>> Hi Nico,<br>
>>><br>
>>>> after having read a particular (integer) time step from an Exodus file<br>
>>>> with the vtkExodusIIReader,<br>
>>>> <a href="http://www.vtk.org/doc/nightly/html/classvtkExodusIIReader.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkExodusIIReader.html</a>, how<br>
>>>> do I extract the actual (float/double) time value that's associated<br>
>>>> with it?<br>
>>><br>
>>><br>
>>> Filters that generate temporal data should set the vtkStreamingDemandDrivenPipeline::TIME_STEPS() key on their corresponding output's vtkInformation object. Access to any vtkAlgorithm's output information is available via the GetOutputInformation() method.<br>
>>><br>
>>> Using the exodus reader on can.ex2 as an example, here's a vtkpython script to get time step information:<br>
>>><br>
>>> from vtk import *<br>
>>> rdr = vtkExodusIIReader()<br>
>>> rdr.SetFileName('/path/to/ParaViewData/Data/can.ex2')<br>
>>> rdr.Update()<br>
>>> rdr.GetOutputInformation(0).Get(vtkStreamingDemandDrivenPipeline.TIME_STEPS())<br>
>>><br>
>>> This returns a vector of doubles. You can use the integer time step as an index into the vector.<br>
>>><br>
>>> David<br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>