[Paraview] Problem with custom time-aware reader

Moreland, Kenneth kmorel at sandia.gov
Thu Sep 3 14:31:10 EDT 2009


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.

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.

-Ken


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

Hi,

I have a problem with a custom time-aware reader which I seem to cannot
work out on my own. I'm hoping someone on this list can shed some light
on the problem.

The reader is designed following John's excellent tutorial
(http://www.paraview.org/Wiki/images/2/20/IEEE08_Time-In-ParaView.ppt)
and has been boiled down for this question to its essentials:

Read in a sequence of plain ASCII text files, each of them containing
exactly one floating point value, nothing more. The values are
interpreted as time step values.

The problem is that all files of the file series are inspected in method
RequestInformation, time information is displayed correctly in the
Information tab, I can walk through the files using VCR controls and
current data time step is properly increased/decreased. The problem,
though, is that for every time step the very same file - always the last
file of the file series - is loaded in RequestData.

Here is the recipe to reproduce:
Unpack and compile the attached plugin in the usual manner using
  mkdir build; cd build
  cmake .. -DCMAKE_BUILD_TYPE=Release
           -DParaView_DIR=/path/to/paraview/build/dir
and load it into ParaView 3.6.1 or 3.7-cvs.

Create a sample input file series via:
  for i in $(seq 0 9); do echo "0.${i}00" > file${i}.foo ; done
(there is already such a file series in the tarball)

Open the collapsed file series "file..foo" in the file open dialog. On
standard output it will be shown that method RequestInformation is
called for all files of the sequence once, and an additional time for
the last file. (I probably could work around that by storing the name of
the last file being parsed and comparing it to the current file name.
But that's of minor interest.)
Click on the Apply button and walk through the files. On standard output
it will be reported that this->FileName does not change at all. I fail
to understand why. Am I missing some callback routine? According to my
understanding

output->GetInformation()->Set(
   vtkDataObject::DATA_TIME_STEPS(),
   &TimeStepValues[this->ActualTimeStep], 1);

in RequestData should do the magic, but it does not. Does anyone have an
idea?

Thanks a lot in advance.
Karl



   ****      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/20090903/c99c3f53/attachment.htm>


More information about the ParaView mailing list