[vtkusers] Streamlines in an Unstructured Grid

Berk Geveci berk.geveci at kitware.com
Tue Jul 31 21:42:01 EDT 2007


Your script looks fine. Is the streamline algorithm producing nothing
at all? Can you check the output's number of points? Can you try
vtkStreamTracer instead? If you are still not getting results, there
may be something wrong with the unstructured grid. Maybe the
connectivity is wrong?

-berk

On 7/31/07, Erik Anderson <eranders at sci.utah.edu> wrote:
> Hi all,
>     I've been having some problems getting streamlines to
> work for me with an unstructured grid.  The Unstructured
> grid has points (x,y,z) and velocities contained in a
> vtkFloatArray named "velocity" per point.  The general
> pipeline I'm trying to use is as follows:
>
> vtkUnstructuredGridReader reader
> vtkAssignAttribute a
>     a.SetInput(reader.GetOutput())
>     a.Assign("velocity", vtkDataSetAttribute::VECTORS,
> vtkDataSetAttribute::VECTORS)
> vtkPointSource seeds
>     seeds.SetCenter(50, 50, 50)
>     seeds.SetRadius(50)
>     seeds.SetNumberOfPoints(50)
>
> vtkRungeKutta4 integrate
> vtkStreamLine streamer
>     streamer.SetIntegrationDirectionToIntegrateBothDirections
>     streamer.SetIntegrator(integrate)
>     streamer.SetStepLength(0.1)
>     streamer.SetIntegrationStepLength(0.1)
>     streamer.SpeedScalarsOn()
>
> vtkPolyDataMapper map
>     map.SetInput(streamer.GetOutput())
>
> # standard pipeline below forr rendering
>
> I am left with a blank screen (nothing rendered).  When I
> render the seed points, I see them in reasonable places
> within the volume.  Am I do ing something wrong?  Please
> note that the above code is more pseudo-code than a real
> implementation.
>
> Erik
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list