[vtkusers] lines and streamlines

Bruno Travençolo bant at grad.icmc.usp.br
Tue Mar 11 13:52:23 EST 2003


Hello All,

I have a vector field with dimensions of 240x231x242 and I want to trace 
some trajectories on it. I tried to use vtkStreamLine:

    vtkPointSource *psource = vtkPointSource::New();
        psource->SetNumberOfPoints(5);
        psource->SetCenter(111,111,115);
        psource->SetRadius(60);

    vtkStreamLine *streamers = vtkStreamLine::New();
        streamers->SetInput((vtkDataSet *) vol);
        streamers->SetSource((vtkDataSet *) psource->GetOutput());
        streamers->SetMaximumPropagationTime(100.0);
        streamers->SetIntegrationStepLength(0.5);
        streamers->SpeedScalarsOff();
        streamers->SetTerminalSpeed(0.0);
        streamers->Update();

It works fine when the number of initial points is small (like 5). When 
I set the number of  initial points to a higher value, like 50, the 
application consumes a lot of memory (1,1 GB) and crashs when the 
operating system swap space finish.
My question is: why this process takes this amount of memory? The 
problem is on the computation of the trajectories (using Runge-Kutta 
order 2) or with its visualization ?

Another question: I can compute on my C++ code the trajectories points. 
What vtk classes I can use to visualize then (i.e, what classes should I 
use to view lines in 3D)?

Thanks a lot,

Bruno.




More information about the vtkusers mailing list