[Paraview] Two issues with time-dependent data

Schuld, Heinrich Schuld at ist.rwth-aachen.de
Wed Sep 13 10:55:35 EDT 2017


Expanding issue 1:
I have created the simple programmable source below, which creates a periodic animation to demonstrate the problem of double display of time steps in periodic data. It is a line that moves according to a sine-function with 3 as cycle duration. When the animation ist set to loop and runs as Sequence with No. Frames=4 , the output reads 0,1,2,3,0,1,2,3,0,... Since step 0 and 3 are equal and both are called, the script exemplifies my problem.
(One issue I ran into creating the source: It is not possible to just set a TIME_RANGE in a programmable source. If I do, the maximum time is not used in the ParaView GUI. Maybe this is linked to the second issue from my original mail?)

Are there more suggestions anyone can share? Should I maybe create bug reports, so that the devs can look at my problems?

Thanks,
Heinrich

___Script___
import math
 
outInfo = self.GetOutputInformation(0)
t = outInfo.Get(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP())
print t
timeRange = outInfo.Get(vtk.vtkStreamingDemandDrivenPipeline.TIME_RANGE())
 
pdo = self.GetPolyDataOutput()
 
#Create the point
newPts = vtk.vtkPoints()
x = 1
y = 0
z = 10*math.sin(t/timeRange[1]*2*math.pi)
newPts.InsertPoint(0, x,y,z)
x = 5
newPts.InsertPoint(1, x,y,z)
pdo.SetPoints(newPts)
 
aPolyLine = vtk.vtkPolyLine()
aPolyLine.GetPointIds().SetNumberOfIds(2)
aPolyLine.GetPointIds().SetId(0, 0)
aPolyLine.GetPointIds().SetId(1, 1)
pdo.Allocate(1, 1)
pdo.InsertNextCell(aPolyLine.GetCellType(), aPolyLine.GetPointIds())


___Req Info___
outInfo = self.GetOutputInformation(0)
 
if outInfo.Has(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS()):
    outInfo.Remove(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS())
 
maxTime=3
timeRange = [0, maxTime]
outInfo.Set(vtk.vtkStreamingDemandDrivenPipeline.TIME_RANGE(), timeRange, 2)
outInfo.Set(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS(), timeRange, 2)
timeSteps=range(0,maxTime+1)
outInfo.Set(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS(), timeSteps, len(timeSteps))


-----Ursprüngliche Nachricht-----
Von: Schuld, Heinrich 
Gesendet: Freitag, 7. Juli 2017 09:35
An: 'Cory Quammen' <cory.quammen at kitware.com>
Cc: 'paraview at paraview.org' <paraview at paraview.org>
Betreff: AW: [Paraview] Two issues with time-dependent data

Thanks Cory for your idea. The problem is, that I would have to set the end of the TIME_RANGE dependently on the timesteps requested by ParaView. Otherwise the delta t between timesteps will not be equal. I could modify my filter so that the user has to select the number of timesteps in it. But I was hoping to use the already present functionalities of ParaView.

Cheers,
Heinrich


-----Ursprüngliche Nachricht-----
Von: Cory Quammen [mailto:cory.quammen at kitware.com] 
Gesendet: Donnerstag, 6. Juli 2017 21:54
An: Schuld, Heinrich <Schuld at ist.rwth-aachen.de>
Cc: paraview at paraview.org
Betreff: Re: [Paraview] Two issues with time-dependent data

[snip]
> 1.       In RequestInformation of the filter, we provide the pipeline just
> with a TIME_RANGE. This is so far working without problem, we can go through
> the range by Sequence or Real Time. When running the Animation as a loop
> though, we encounter the issue that the beginning and the end of the time
> range are both displayed. Since our data is periodic and the TIME_RANGE is a
> cycle duration, these two steps are identical. As you can guess, it is not
> desired to see the same step two times right behind each other. Is there a
> way to prevent this behaviour?

Can you just set the upper end of the TIME_RANGE to one timestep
before what you have now? In other words, instead of having the first
and last timesteps provide the same data, end the TIME_RANGE earlier
by one timestep. That will prevent the doubling of the timestep when
the animation resets.

> 2.       When we save the filter in a state file and load it afterwards with
> a different dataset, the displayed time range in ParaView shows the wrong
> data. Although in RequestInformation the correct TIME_RANGE of the new
> dataset is set to the pipeline, ParaView/the Animation View still shows the
> time data of the state file. It only changes, if after loading the state
> file, a different TIME_RANGE with different values is set in
> RequestInformation. We can live with this issue, but maybe it is a bug that
> is easy to fix.

I'm not sure about this one. Maybe someone else can chime in.

Thanks,
Cory

>
>
> We will be grateful for any advice or suggestion!
>
>
>
> Thanks in advance and cheers,
>
> Heinrich
>
>
>
> --
>
> Dipl.-Ing. Heinrich Schuld
>
> Institute of Jet Propulsion and Turbomachinery
>
> RWTH Aachen
>
> Templergraben 55
>
> 52062 Aachen
>
> Germany
>
>
>
> Tel:         +49 241 80 99652
>
> Fax:        +49 241 80 92229
>
> E-Mail:   schuld at ist.rwth-aachen.de
>
> www:     http://www.ist.rwth-aachen.de
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the ParaView mailing list