<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'>I just committed the changes the CVS trunk. I just wanted to be sure they solved your problem beforehand.<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>/cvsroot/ParaView3/ParaView3/Servers/Filters/vtkFileSeriesReader.cxx,v <-- vtkFileSeriesReader.cxx<BR>
new revision: 1.17; previous revision: 1.16<BR>
/cvsroot/ParaView3/ParaView3/Servers/Filters/vtkFileSeriesReader.h,v <-- vtkFileSeriesReader.h<BR>
new revision: 1.6; previous revision: 1.5<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
-Ken<BR>
<BR>
<BR>
On 9/19/09 2:56 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>
Indeed, that's a nice and simple solution to the problem! A pity I<BR>
didn't come up with it myself.<BR>
Now, if that patch would make it into the repository, that'd be great.<BR>
(It is not possible to provide a own FileSeriesReader class along with a<BR>
custom reader plugin, is it? Simply including the own (renamed)<BR>
FileSeriesReader source code in the plugin's CMakeLists.txt, changing<BR>
its server manager XML to use that particular class and compiling did at<BR>
least not work for me. Got an error as soon as trying to use the reader<BR>
from PV GUI.)<BR>
<BR>
Karl<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: Freitag, 18. September 2009 23:15:24<BR>
Subject: [Paraview] Problem with custom time-aware reader<BR>
> Oops. That is exactly what I intended with the patch I gave you, but I<BR>
> 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<BR>
> 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>
> 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<BR>
> despite<BR>
> > what I thought and posted earlier everything is already there<BR>
> to be able<BR>
> > to implement a toggle to use/ignore time step values contained<BR>
> in a file<BR>
> > series. I'd like to propose the attached patch. It can be<BR>
> tested with<BR>
> > the attached minimal time series reader plugin, sample input<BR>
> files are<BR>
> > contained. The plugin's server manager XML has been extended to<BR>
> 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<BR>
> 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>
><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>
</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>