<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'>Oops. That is exactly what I intended with the patch I gave you, but I made a goof. I guess I should have actually tried it before sending it off.<BR>
<BR>
It’s a simple fix. I just needed to add a line. The newly attached patch should work. I actually tried it before sending this time. :)<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 9/18/09 9:05 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'>Ken,<BR>
<BR>
Thanks for looking into it again.<BR>
But your patch does less than mine (not only in terms of changed lines<BR>
:-) ). Loading e.g. the file series<BR>
<BR>
sampleinputfiles/withduplicatetimes[0-9].foo<BR>
<BR>
with "Ignore Reader Time" unchecked, the information tab lists the<BR>
following time indices and times:<BR>
Idx Val<BR>
0 0<BR>
1 0.1<BR>
2 0.3<BR>
3 0.4<BR>
4 0.8<BR>
5 0.9<BR>
That's fine, that's default behaviour. The files<BR>
withduplicatetimes{1,4,5,6}.foo are ignored.<BR>
<BR>
With "Ignore Reader Time" checked, the information tab does not list any<BR>
time index/value any more and only the last file of the series gets<BR>
loaded: sampleinputfiles/withduplicatetimes9.foo. So, one cannot step<BR>
through the intermediate results for a given time step value any more.<BR>
<BR>
Applying my patch, the information tab lists (in case "Ignore Reader<BR>
Time" is checked) all 10 files with fake time step values:<BR>
Idx Val<BR>
0 0<BR>
1 1<BR>
2 2<BR>
3 3<BR>
4 4<BR>
5 5<BR>
6 6<BR>
7 7<BR>
8 8<BR>
9 9<BR>
and one can really step through all files of the series.<BR>
<BR>
Karl<BR>
<BR>
<BR>
----- Original Message -----<BR>
From: "Moreland, Kenneth" <<a href="kmorel@sandia.gov">kmorel@sandia.gov</a>><BR>
To: Karl König <<a href="kkoenig11@web.de">kkoenig11@web.de</a>><BR>
CC: "<a href="paraview@paraview.org">paraview@paraview.org</a>" <<a href="paraview@paraview.org">paraview@paraview.org</a>><BR>
Sent: 09/18/09 16:19:37<BR>
Subject: [Paraview] Problem with custom time-aware reader<BR>
> Karl,<BR>
><BR>
> Your patch seems overly complicated. There is exactly one check in<BR>
> vtkFileSeriesReader to determine whether the internal reader has time,<BR>
> and that is in RequestInformation. It is a lot less intrusive to just<BR>
> add a condition to that check there. I’ve attached a patch that<BR>
> implements the no-time flag in this way. (BTW, I changed the name from<BR>
> IgnoreTimeStepValues to IgnoreReaderTime since a reader can in fact<BR>
> specify time without specifying time steps.)<BR>
><BR>
> -Ken<BR>
><BR>
><BR>
> On 9/18/09 4:47 AM, "Karl König" <<a href="kkoenig11@web.de">kkoenig11@web.de</a>> wrote:<BR>
><BR>
> Hi,<BR>
><BR>
> I dug deeper into the class FileSeriesReader and found out that despite<BR>
> what I thought and posted earlier everything is already there to be able<BR>
> to implement a toggle to use/ignore time step values contained in a file<BR>
> series. I'd like to propose the attached patch. It can be tested with<BR>
> the attached minimal time series reader plugin, sample input files are<BR>
> contained. The plugin's server manager XML has been extended to expose<BR>
> the IgnoreTimeStepValues checkbox provided by the patched class<BR>
> FileSeriesReader.<BR>
><BR>
> I don't see the patch interfering with existing readers relying on class<BR>
> FileSeriesReader.<BR>
> Any thoughts?<BR>
><BR>
> Thanks in advance for feedback,<BR>
> Karl<BR>
><BR>
><BR>
><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>
><BR>
<BR>
<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><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>