[Paraview] Problem with custom time-aware reader
Karl König
kkoenig11 at web.de
Sat Sep 19 04:56:05 EDT 2009
Ken,
Indeed, that's a nice and simple solution to the problem! A pity I
didn't come up with it myself.
Now, if that patch would make it into the repository, that'd be great.
(It is not possible to provide a own FileSeriesReader class along with a
custom reader plugin, is it? Simply including the own (renamed)
FileSeriesReader source code in the plugin's CMakeLists.txt, changing
its server manager XML to use that particular class and compiling did at
least not work for me. Got an error as soon as trying to use the reader
from PV GUI.)
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: Freitag, 18. September 2009 23:15:24
Subject: [Paraview] Problem with custom time-aware reader
> 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
>
More information about the ParaView
mailing list