[vtkusers] Streamlines from a FloatArray

tom fogal tfogal at apollo.sr.unh.edu
Tue Jul 6 15:28:10 EDT 2004


Hi all, I have a vector field in a 3-component vtkFloatArray and I
would like to plot a streamline or two through that field. I tried
giving a vtkStreamLine my float array but it wants data in a vtkDataSet
format so I threw it into a vtkPolyData instance first. So my setup is
similar to the below:

vtkFloatArray *fa;
vtkPoints *p;
vtkPolyData *pd;
vtkStreamLine *sl;

p->SetData(fa);
pd->SetPoints(points);
sl->SetInput(pd);

When I try to run this, vtkStreamLine tells me I have no vector data
defined. This is with VTK 4.2.

Any idea what I might be doing wrong? Or maybe there is an easier way
to do this?

Thanks,

-tom



More information about the vtkusers mailing list