<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. 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. But I don’t see anywhere in RequestData where you translated the time index to a file name. At some point, probably in RequestInformation, FileName is set to the last file. That never is overridden in RequestData.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 9/3/09 9:19 AM, "Karl König" <<a href="kkoenig11@web.de">kkoenig11@web.de</a>> 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>
mkdir build; cd build<BR>
cmake .. -DCMAKE_BUILD_TYPE=Release<BR>
-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>
for i in $(seq 0 9); do echo "0.${i}00" > file${i}.foo ; done<BR>
(there is already such a file series in the tarball)<BR>
<BR>
Open the collapsed file series "file..foo" 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->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->GetInformation()->Set(<BR>
vtkDataObject::DATA_TIME_STEPS(),<BR>
&TimeStepValues[this->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>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <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>