[prev in list] [next in list] [prev in thread] [next in thread] 

List:       paraview
Subject:    Re: [Paraview] Time-Varying Input Sources
From:       "Randall Hand" <randall.hand () gmail ! com>
Date:       2008-09-29 17:20:35
Message-ID: b02264720809291020g5fd2a3ddx3f15cabc2fd5e8cf () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Not really, no.  This reader is a bit unusual because it's not really a
reader.  It reads a simple 2D Geometry from disk, and then uses 2 other
files to run a Neural Network simulation on that grid.  The number of
timesteps isn't known until after the network is run, which requires all
files to be loaded from disk.

----------------------------------------
Randall Hand
Visualization Scientist
ERDC MSRC-ITL


On Mon, Sep 29, 2008 at 12:01 PM, Michael Jackson <
mike.jackson@bluequartz.net> wrote:

> Having gone through this a few times myself, is there a way in the
> RequestInformation to get the Time information from the file? On some of my
> custom files that involved opening the file to do a partial read just to get
> the time information (and a few other pieces of information) for the
> pipeline.
>
> I have some source code that you can look at if you need it.
>
> Mike Jackson
>
>
>
> On Sep 29, 2008, at 12:42 PM, Randall Hand wrote:
>
>  Seems that was the final issue.  I was initializing those variables in
>> RequestData, but RequestInformation is called before then.  I wound up
>> simply making RequestInformation call RequestData, and now it works! :)
>> ----------------------------------------
>> Randall Hand
>> Visualization Scientist
>> ERDC MSRC-ITL
>>
>>
>> On Mon, Sep 29, 2008 at 11:20 AM, Moreland, Kenneth <kmorel@sandia.gov>
>> wrote:
>> Uhhhh... I dunno.  It should report all of the time steps.  Are you sure
>> your RequestInformation method is reporting all of the time steps, and not
>> just 2?
>>
>> -Ken
>>
>>
>> On 9/29/08 10:13 AM, "Randall Hand" <randall.hand@gmail.com> wrote:
>>
>> > Ok, that gets it to display 2 timesteps (0 and 1).  How do I get it to
>> display
>> > all 48 so that the user can flip between them with the spinner up top?
>> >
>> > It still works with the Animation view if I manually configure it to
>> show 48
>> > frames between 0 and 47.
>> > ----------------------------------------
>> > Randall Hand
>> > Visualization Scientist
>> > ERDC MSRC-ITL
>> >
>> >
>> > On Mon, Sep 29, 2008 at 10:42 AM, Moreland, Kenneth <kmorel@sandia.gov>
>> wrote:
>> >> Did you add the special TimestepValues property to the reader's server
>> >> manager XML definition?
>> >>
>> >>      <DoubleVectorProperty name="TimestepValues"
>> >>                            repeatable="1"
>> >>                            information_only="1">
>> >>        <TimeStepsInformationHelper/>
>> >>        <Documentation>
>> >>          Available timestep values.
>> >>        </Documentation>
>> >>      </DoubleVectorProperty>
>> >>
>> >> -Ken
>> >>
>> >>
>> >> On 9/29/08 9:38 AM, "Randall Hand" <randall.hand@gmail.com> wrote:
>> >>
>> >>>> I've written a VTK File Reader that supports multiple timesteps (48
>> in my
>> >>>> tests).  But when I load the data, it shows me no timestep data in
>> the
>> >>>> properties panel, and the time increment thing at the top toolbar is
>> greyed
>> >>>> out.  However, if I use the Animation tools to animate from timestep0
>> to 47
>> >>>> >> in
>> >>>> 48 steps, it properly animates through time.
>> >>>>
>> >>>> What am I doing wrong?  My RequestInformation (where I think this
>> >>> information
>> >>>> comes from) is shown below:
>> >>>>
>> >>>>
>>
>> >>> //--------------------------------------------------------------------------
>> >>> --
>> >>>> int vtkAdhfaNetwork::RequestInformation(
>> >>>>   vtkInformation* reqInfo,
>> >>>>   vtkInformationVector** inVector,
>> >>>>   vtkInformationVector* outVector
>> >>>>   )
>> >>>> {
>> >>>>
>> if(!this->Superclass::RequestInformation(reqInfo,inVector,outVector))
>> >>>>     {
>> >>>>     return 0;
>> >>>>     }
>> >>>>
>> >>>>   vtkInformation *info=outVector->GetInformationObject(0);
>> >>>>   double tRange[2];
>> >>>>   tRange[0] = this->Steps[0];
>> >>>>   tRange[1] = this->Steps[this->NumSteps-1];
>> >>>>   info->Set(
>> >>>>     vtkStreamingDemandDrivenPipeline::TIME_RANGE(),
>> >>>>     tRange,
>> >>>>     2);
>> >>>>   info->Set(
>> >>>>     vtkStreamingDemandDrivenPipeline::TIME_STEPS(),
>> >>>>     this->Steps,
>> >>>>     this->NumSteps);
>> >>>>   return 1;
>> >>>> }
>> >>>>
>> >>>> ----------------------------------------
>> >>>> Randall Hand
>> >>>> Visualization Scientist
>> >>>> ERDC MSRC-ITL
>> >>
>> >>
>> >>    ****      Kenneth Moreland
>> >>     ***      Sandia National Laboratories
>> >> ***********
>> >> *** *** ***  email: kmorel@sandia.gov
>> >> **  ***  **  phone: (505) 844-8919
>> >>     ***      fax:   (505) 845-0833
>> >>
>> >>
>> >>
>> >
>>
>>
>>  ****      Kenneth Moreland
>>   ***      Sandia National Laboratories
>> ***********
>> *** *** ***  email: kmorel@sandia.gov
>> **  ***  **  phone: (505) 844-8919
>>   ***      fax:   (505) 845-0833
>>
>>
>>
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView@paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
>

[Attachment #5 (text/html)]

<div dir="ltr">Not really, no.&nbsp; This reader is a bit unusual because it&#39;s \
not really a reader.&nbsp; It reads a simple 2D Geometry from disk, and then uses 2 \
other files to run a Neural Network simulation on that grid.&nbsp; The number of \
timesteps isn&#39;t known until after the network is run, which requires all files to \
be loaded from disk.<br> <br \
clear="all">----------------------------------------<br>Randall Hand \
<br>Visualization Scientist<br>ERDC MSRC-ITL<br> <br><br><div class="gmail_quote">On \
Mon, Sep 29, 2008 at 12:01 PM, Michael Jackson <span dir="ltr">&lt;<a \
href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Having gone through this a few \
times myself, is there a way in the RequestInformation to get the Time information \
from the file? On some of my custom files that involved opening the file to do a \
partial read just to get the time information (and a few other pieces of information) \
for the pipeline.<br>

<br>
I have some source code that you can look at if you need it.<br>
<br>
Mike Jackson<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On Sep 29, 2008, at 12:42 PM, Randall Hand wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div \
class="Wj3C7c"> Seems that was the final issue. &nbsp;I was initializing those \
variables in RequestData, but RequestInformation is called before then. &nbsp;I wound \
                up simply making RequestInformation call RequestData, and now it \
                works! :)<br>
----------------------------------------<br>
Randall Hand<br>
Visualization Scientist<br>
ERDC MSRC-ITL<br>
<br>
<br>
On Mon, Sep 29, 2008 at 11:20 AM, Moreland, Kenneth &lt;<a \
href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt; wrote:<br> \
Uhhhh... I dunno. &nbsp;It should report all of the time steps. &nbsp;Are you \
sure<br> your RequestInformation method is reporting all of the time steps, and \
not<br> just 2?<br>
<br>
-Ken<br>
<br>
<br>
On 9/29/08 10:13 AM, &quot;Randall Hand&quot; &lt;<a \
href="mailto:randall.hand@gmail.com" target="_blank">randall.hand@gmail.com</a>&gt; \
wrote:<br> <br>
&gt; Ok, that gets it to display 2 timesteps (0 and 1). &nbsp;How do I get it to \
display<br> &gt; all 48 so that the user can flip between them with the spinner up \
top?<br> &gt;<br>
&gt; It still works with the Animation view if I manually configure it to show 48<br>
&gt; frames between 0 and 47.<br>
&gt; ----------------------------------------<br>
&gt; Randall Hand<br>
&gt; Visualization Scientist<br>
&gt; ERDC MSRC-ITL<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Sep 29, 2008 at 10:42 AM, Moreland, Kenneth &lt;<a \
href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt; wrote:<br> \
&gt;&gt; Did you add the special TimestepValues property to the reader&#39;s \
server<br> &gt;&gt; manager XML definition?<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp;&lt;DoubleVectorProperty \
name=&quot;TimestepValues&quot;<br> &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;repeatable=&quot;1&quot;<br> &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;information_only=&quot;1&quot;&gt;<br> &gt;&gt; &nbsp; &nbsp; &nbsp; \
&nbsp;&lt;TimeStepsInformationHelper/&gt;<br> &gt;&gt; &nbsp; &nbsp; &nbsp; \
&nbsp;&lt;Documentation&gt;<br> &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Available \
timestep values.<br> &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/Documentation&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp;&lt;/DoubleVectorProperty&gt;<br>
&gt;&gt;<br>
&gt;&gt; -Ken<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 9/29/08 9:38 AM, &quot;Randall Hand&quot; &lt;<a \
href="mailto:randall.hand@gmail.com" target="_blank">randall.hand@gmail.com</a>&gt; \
wrote:<br> &gt;&gt;<br>
&gt;&gt;&gt;&gt; I&#39;ve written a VTK File Reader that supports multiple timesteps \
(48 in my<br> &gt;&gt;&gt;&gt; tests). &nbsp;But when I load the data, it shows me no \
timestep data in the<br> &gt;&gt;&gt;&gt; properties panel, and the time increment \
thing at the top toolbar is greyed<br> &gt;&gt;&gt;&gt; out. &nbsp;However, if I use \
the Animation tools to animate from timestep0 to 47<br> &gt;&gt;&gt;&gt; &gt;&gt; \
in<br> &gt;&gt;&gt;&gt; 48 steps, it properly animates through time.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; What am I doing wrong? &nbsp;My RequestInformation (where I think \
this<br> &gt;&gt;&gt; information<br>
&gt;&gt;&gt;&gt; comes from) is shown below:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&nbsp;//--------------------------------------------------------------------------<br>
 &gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; int vtkAdhfaNetwork::RequestInformation(<br>
&gt;&gt;&gt;&gt; &nbsp; vtkInformation* reqInfo,<br>
&gt;&gt;&gt;&gt; &nbsp; vtkInformationVector** inVector,<br>
&gt;&gt;&gt;&gt; &nbsp; vtkInformationVector* outVector<br>
&gt;&gt;&gt;&gt; &nbsp; )<br>
&gt;&gt;&gt;&gt; {<br>
&gt;&gt;&gt;&gt; &nbsp; \
if(!this-&gt;Superclass::RequestInformation(reqInfo,inVector,outVector))<br> \
&gt;&gt;&gt;&gt; &nbsp; &nbsp; {<br> &gt;&gt;&gt;&gt; &nbsp; &nbsp; return 0;<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; }<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; &nbsp; vtkInformation \
*info=outVector-&gt;GetInformationObject(0);<br> &gt;&gt;&gt;&gt; &nbsp; double \
tRange[2];<br> &gt;&gt;&gt;&gt; &nbsp; tRange[0] = this-&gt;Steps[0];<br>
&gt;&gt;&gt;&gt; &nbsp; tRange[1] = this-&gt;Steps[this-&gt;NumSteps-1];<br>
&gt;&gt;&gt;&gt; &nbsp; info-&gt;Set(<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; vtkStreamingDemandDrivenPipeline::TIME_RANGE(),<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; tRange,<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; 2);<br>
&gt;&gt;&gt;&gt; &nbsp; info-&gt;Set(<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; vtkStreamingDemandDrivenPipeline::TIME_STEPS(),<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; this-&gt;Steps,<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; this-&gt;NumSteps);<br>
&gt;&gt;&gt;&gt; &nbsp; return 1;<br>
&gt;&gt;&gt;&gt; }<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ----------------------------------------<br>
&gt;&gt;&gt;&gt; Randall Hand<br>
&gt;&gt;&gt;&gt; Visualization Scientist<br>
&gt;&gt;&gt;&gt; ERDC MSRC-ITL<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp;**** &nbsp; &nbsp; &nbsp;Kenneth Moreland<br>
&gt;&gt; &nbsp; &nbsp; *** &nbsp; &nbsp; &nbsp;Sandia National Laboratories<br>
&gt;&gt; ***********<br>
&gt;&gt; *** *** *** &nbsp;email: <a href="mailto:kmorel@sandia.gov" \
target="_blank">kmorel@sandia.gov</a><br> &gt;&gt; ** &nbsp;*** &nbsp;** &nbsp;phone: \
(505) 844-8919<br> &gt;&gt; &nbsp; &nbsp; *** &nbsp; &nbsp; &nbsp;fax: &nbsp; (505) \
845-0833<br> &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
<br>
<br>
 &nbsp;**** &nbsp; &nbsp; &nbsp;Kenneth Moreland<br>
 &nbsp; *** &nbsp; &nbsp; &nbsp;Sandia National Laboratories<br>
***********<br>
*** *** *** &nbsp;email: <a href="mailto:kmorel@sandia.gov" \
                target="_blank">kmorel@sandia.gov</a><br>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<br>
 &nbsp; *** &nbsp; &nbsp; &nbsp;fax: &nbsp; (505) 845-0833<br>
<br>
<br>
<br>
<br></div></div>
_______________________________________________<br>
ParaView mailing list<br>
<a href="mailto:ParaView@paraview.org" target="_blank">ParaView@paraview.org</a><br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" \
target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br> \
</blockquote> <br>
</blockquote></div><br></div>



_______________________________________________
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic