[Paraview] generating streamlines from within a programmable filter for pvti data

Ayan Biswas biswas.36 at buckeyemail.osu.edu
Thu Aug 2 12:24:29 EDT 2012


Hello experts,

I am trying to generate streamlines using the streamtracer filter which I am calling from within a programmable filter. My input data is in .pvti format and I am running in a multiprocessor environment [16 processors]. I was requesting data to be split up among the processors using the request information script. And then trying to generate a streamline at a given point.

Although my original goal was to iterate over the whole data set and draw small streamlines at each point, right now I am not able to generate even a small streamline at a given point. It always returns 0 length streamlines. Although I am able to do it in a single core machine without parallelism.

And when I use streamtracer filter outside the programmable filter, it works fine and returns the streamline of non-zero length.

Can anyone point me towards the solution to this problem?

My sample code is attached below:
###################################

import paraview.vtk as vtk


input = self.GetInput()


posX=437

posY=372

posZ=20.5


streamTracer = vtk.vtkStreamTracer()

streamTracer.SetInput(input)

streamTracer.SetStartPosition(posX,posY,posZ)

streamTracer.SetMaximumPropagation(2000)

streamTracer.SetInitialIntegrationStep(0.5)

streamTracer.SetIntegrationDirection(0)

streamTracer.SetIntegratorType(0)

streamTracer.SetMaximumNumberOfSteps(2000)

streamTracer.SetTerminalSpeed(1e-12)

streamTracer.Update()


streamLines = streamTracer.GetOutput()

print(streamLines.GetNumberOfPoints())


###################################

Thanks and best regards,
Ayan Biswas
CSE (PhD) student,
OSU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120802/f5b09e40/attachment.htm>


More information about the ParaView mailing list