<HTML>
<HEAD>
<TITLE>Re: [Paraview] Problem with custom time-aware reader</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Everything looks like it is working fine to me. &nbsp;It looks like you are getting the right time value in RequestData, you are finding the right time index, and you are setting the right time value in the output data.<BR>
<BR>
The only thing wrong I see is that it is always printing out the filename for the last file. &nbsp;But I don&#8217;t see anywhere in RequestData where you translated the time index to a file name. &nbsp;At some point, probably in RequestInformation, FileName is set to the last file. &nbsp;That never is overridden in RequestData.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 9/3/09 9:19 AM, &quot;Karl K&ouml;nig&quot; &lt;<a href="kkoenig11@web.de">kkoenig11@web.de</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi,<BR>
<BR>
I have a problem with a custom time-aware reader which I seem to cannot<BR>
work out on my own. I'm hoping someone on this list can shed some light<BR>
on the problem.<BR>
<BR>
The reader is designed following John's excellent tutorial<BR>
(<a href="http://www.paraview.org/Wiki/images/2/20/IEEE08_Time-In-ParaView.ppt">http://www.paraview.org/Wiki/images/2/20/IEEE08_Time-In-ParaView.ppt</a>)<BR>
and has been boiled down for this question to its essentials:<BR>
<BR>
Read in a sequence of plain ASCII text files, each of them containing<BR>
exactly one floating point value, nothing more. The values are<BR>
interpreted as time step values.<BR>
<BR>
The problem is that all files of the file series are inspected in method<BR>
RequestInformation, time information is displayed correctly in the<BR>
Information tab, I can walk through the files using VCR controls and<BR>
current data time step is properly increased/decreased. The problem,<BR>
though, is that for every time step the very same file - always the last<BR>
file of the file series - is loaded in RequestData.<BR>
<BR>
Here is the recipe to reproduce:<BR>
Unpack and compile the attached plugin in the usual manner using<BR>
&nbsp;&nbsp;mkdir build; cd build<BR>
&nbsp;&nbsp;cmake .. -DCMAKE_BUILD_TYPE=Release<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-DParaView_DIR=/path/to/paraview/build/dir<BR>
and load it into ParaView 3.6.1 or 3.7-cvs.<BR>
<BR>
Create a sample input file series via:<BR>
&nbsp;&nbsp;for i in $(seq 0 9); do echo &quot;0.${i}00&quot; &gt; file${i}.foo ; done<BR>
(there is already such a file series in the tarball)<BR>
<BR>
Open the collapsed file series &quot;file..foo&quot; in the file open dialog. On<BR>
standard output it will be shown that method RequestInformation is<BR>
called for all files of the sequence once, and an additional time for<BR>
the last file. (I probably could work around that by storing the name of<BR>
the last file being parsed and comparing it to the current file name.<BR>
But that's of minor interest.)<BR>
Click on the Apply button and walk through the files. On standard output<BR>
it will be reported that this-&gt;FileName does not change at all. I fail<BR>
to understand why. Am I missing some callback routine? According to my<BR>
understanding<BR>
<BR>
output-&gt;GetInformation()-&gt;Set(<BR>
&nbsp;&nbsp;&nbsp;vtkDataObject::DATA_TIME_STEPS(),<BR>
&nbsp;&nbsp;&nbsp;&amp;TimeStepValues[this-&gt;ActualTimeStep], 1);<BR>
<BR>
in RequestData should do the magic, but it does not. Does anyone have an<BR>
idea?<BR>
<BR>
Thanks a lot in advance.<BR>
Karl<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="1"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:7.5pt'><BR>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>