[Paraview] Problem with custom time-aware reader

Moreland, Kenneth kmorel at sandia.gov
Fri Sep 18 17:15:24 EDT 2009


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.

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. :)

-Ken


On 9/18/09 9:05 AM, "Karl König" <kkoenig11 at web.de> wrote:

Ken,

Thanks for looking into it again.
But your patch does less than mine (not only in terms of changed lines
:-) ). Loading e.g. the file series

sampleinputfiles/withduplicatetimes[0-9].foo

with "Ignore Reader Time" unchecked, the information tab lists the
following time indices and times:
Idx Val
0   0
1   0.1
2   0.3
3   0.4
4   0.8
5   0.9
That's fine, that's default behaviour. The files
withduplicatetimes{1,4,5,6}.foo are ignored.

With "Ignore Reader Time" checked, the information tab does not list any
time index/value any more and only the last file of the series gets
loaded: sampleinputfiles/withduplicatetimes9.foo. So, one cannot step
through the intermediate results for a given time step value any more.

Applying my patch, the information tab lists (in case "Ignore Reader
Time" is checked) all 10 files with fake time step values:
Idx Val
0   0
1   1
2   2
3   3
4   4
5   5
6   6
7   7
8   8
9   9
and one can really step through all files of the series.

Karl


----- Original Message -----
From: "Moreland, Kenneth" <kmorel at sandia.gov>
To: Karl König <kkoenig11 at web.de>
CC: "paraview at paraview.org" <paraview at paraview.org>
Sent: 09/18/09 16:19:37
Subject: [Paraview] Problem with custom time-aware reader
> Karl,
>
> Your patch seems overly complicated.  There is exactly one check in
> vtkFileSeriesReader to determine whether the internal reader has time,
> and that is in RequestInformation.  It is a lot less intrusive to just
> add a condition to that check there.  I've attached a patch that
> implements the no-time flag in this way.  (BTW, I changed the name from
> IgnoreTimeStepValues to IgnoreReaderTime since a reader can in fact
> specify time without specifying time steps.)
>
> -Ken
>
>
> On 9/18/09 4:47 AM, "Karl König" <kkoenig11 at web.de> wrote:
>
>     Hi,
>
>     I dug deeper into the class FileSeriesReader and found out that despite
>     what I thought and posted earlier everything is already there to be able
>     to implement a toggle to use/ignore time step values contained in a file
>     series. I'd like to propose the attached patch. It can be tested with
>     the attached minimal time series reader plugin, sample input files are
>     contained. The plugin's server manager XML has been extended to expose
>     the IgnoreTimeStepValues checkbox provided by the patched class
>     FileSeriesReader.
>
>     I don't see the patch interfering with existing readers relying on class
>     FileSeriesReader.
>     Any thoughts?
>
>     Thanks in advance for feedback,
>     Karl
>
>
>
>    ****      Kenneth Moreland
>     ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov
> **  ***  **  phone: (505) 844-8919
>     ***      web:   http://www.cs.unm.edu/~kmorel
>






   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090918/fc41802d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkFileSeriesReader.patch
Type: application/octet-stream
Size: 3708 bytes
Desc: vtkFileSeriesReader.patch
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090918/fc41802d/attachment.obj>


More information about the ParaView mailing list